Skip to content

Commit

Permalink
Add CI for AArch64 via Cirrus (#596)
Browse files Browse the repository at this point in the history
* Move AArch64 to LLVM 11
* Fixes for remaining test failures on AArch64
  • Loading branch information
elliottslaughter authored Aug 16, 2022
1 parent dcd2eff commit f85f743
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 7 deletions.
13 changes: 12 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
task:
freebsd_task:
name: FreeBSD
freebsd_instance:
matrix:
Expand All @@ -20,3 +20,14 @@ task:
export MAKE=gmake
export CC=cc
bash travis.sh
arm_task:
name: Linux AArch64
arm_container:
image: ubuntu:18.04
env:
llvm: 11.1.0
arch: aarch64
threads: 2
script: |
./docker/install_script_multiarch.sh
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,12 @@ jobs:
matrix:
distro: ['ubuntu-18.04']
arch: ['arm64', 'ppc64le']
llvm: ['13.0.0']
llvm: ['13.0.0', '11.1.0']
exclude:
- arch: 'arm64'
llvm: '13.0.0'
- arch: 'ppc64le'
llvm: '11.1.0'
steps:
- uses: actions/checkout@v1
- run: ./travis.sh
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# Release 1.0.5 (2022-08-16)

This release stabilizes support for ARM (AArch64). On a variety of
hardware (Graviton, NVIDIA Jetson), Terra now passes 100% of the test
suite.

## Improvements

* Fixes for multiple issues on AArch64, allowing Terra to pass 100%
of the test suite.
* Updated LuaJIT to obtain fixes for AArch64.

## Known Issues

* On AArch64, Terra requires LLVM 11 or older. Newer LLVM versions
result in segfaults on some tests.

# Release 1.0.4 (2022-07-08)

This release stabilizes support for PPC64le. On POWER9 hardware, Terra
Expand Down
18 changes: 18 additions & 0 deletions docker/install_script_multiarch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# because Cirrus gives us ARM containers and not VMs, we have to
# extract the body of Dockerfile.ubuntu-prebuilt-multiarch here

set -e

apt-get update -qq
apt-get install -qq build-essential cmake git python3 wget
wget -nv https://github.com/terralang/llvm-build/releases/download/llvm-$llvm/clang+llvm-$llvm-$arch-linux-gnu.tar.xz
tar xf clang+llvm-$llvm-$arch-linux-gnu.tar.xz
mv clang+llvm-$llvm-$arch-linux-gnu /llvm
rm clang+llvm-$llvm-$arch-linux-gnu.tar.xz
echo "disabled: /terra/docker/install_cuda.sh"
cd build
cmake -DCMAKE_PREFIX_PATH=/llvm/install -DCMAKE_INSTALL_PREFIX=/terra_install ..
make install -j$threads
ctest --output-on-failure -j$threads
2 changes: 1 addition & 1 deletion tests/class.t
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct C(Class(B)) {
terra C:combine(a : int) : int
return self.c + self.a + self.b + a
end
terra C:times2() : double
terra C:times2() : int
return self.a * 4
end

Expand Down
2 changes: 1 addition & 1 deletion tests/class6.t
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct C(Class(B)) {
terra C:combine(a : int) : int
return self.c + self.a + self.b + a
end
terra C:times2() : double
terra C:times2() : int
return self.a * 4
end

Expand Down
4 changes: 2 additions & 2 deletions tests/coverage3.t
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- FIXME: Test currently fails on Windows (and PPC64le too)
-- FIXME: Test currently fails on Windows (and PPC64le/AArch64 too)
-- https://github.com/terralang/terra/issues/287
local ffi = require("ffi")
if ffi.os == "Windows" or ffi.arch == "ppc64le" then
if ffi.os == "Windows" or ffi.arch == "ppc64le" or ffi.arch == "arm64" then
print("this test is not compatible with " .. ffi.os .. " " .. ffi.arch)
os.exit()
end
Expand Down
3 changes: 2 additions & 1 deletion tests/vecobj.t
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ end)
-- There are two limitations of Moonjit on PPC64le that require workarounds:
-- 1. the printfloat callback results in a segfault
-- 2. passing arrays to Terra from Lua results in garbage
-- Note: the second of these applies to AArch64 (ARM) as well

if ffi.arch ~= "ppc64le" then
printfloat = terralib.cast({float}->{},print)
Expand All @@ -68,7 +69,7 @@ end
foo:printpretty(true,false)
foo:disas()

if ffi.arch ~= "ppc64le" then
if ffi.arch ~= "ppc64le" and ffi.arch ~= "arm64" then
assert(20 == foo({{1,2,3,4}},{{5,6,7,8}}))
else
terra call_foo(v0 : float, v1 : float, v2 : float, v3 : float, w0 : float, w1 : float, w2 : float, w3 : float)
Expand Down

0 comments on commit f85f743

Please sign in to comment.