Skip to content

Commit

Permalink
[CI] Move tests on aarch64 linux to GitHub Actions (#543)
Browse files Browse the repository at this point in the history
* [CI] Move tests on aarch64 linux to GitHub Actions

* Fix name of aarch64-linux runners

Co-authored-by: Ian McInerney <mcianster@gmail.com>

* Skip CUDA integration tests that could fail

---------

Co-authored-by: Ian McInerney <mcianster@gmail.com>
  • Loading branch information
giordano and imciner2 authored Jan 21, 2025
1 parent 63d407a commit 29627db
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 45 deletions.
37 changes: 0 additions & 37 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,6 @@ steps:
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 120

- label: ":julia: :linux: aarch64 - Julia v{{matrix.version}} -- {{matrix.group}}"
matrix:
setup:
version:
- "1.10"
- "1.11"
group:
- core
- neural_networks
- integration
plugins:
- JuliaCI/julia#v1:
version: "{{matrix.version}}"
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- ext
- lib/ReactantCore/src
commands: |
julia --project=. -e 'println("--- :julia: Instantiating project")
using Pkg
Pkg.develop([PackageSpec(path="lib/ReactantCore")])'
julia --project=. -e 'println("--- :julia: Run Tests")
using Pkg
Pkg.test(; coverage="user")'
agents:
queue: "juliaecosystem"
os: "linux"
sandbox_capable: "true"
arch: "aarch64"
env:
REACTANT_TEST_GROUP: "{{matrix.group}}"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 120

# - group: ":racehorse: Benchmarks"
# steps:
# - label: "CPU: Run Benchmarks"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
# - 'nightly'
os:
- ubuntu-20.04
- ubuntu-24.04-arm
- macOS-latest
test_group:
- core
Expand Down Expand Up @@ -89,9 +90,10 @@ jobs:
# version: '1.10'
# test_group: integration
exclude:
# these are run on Buildkite
- os: ubuntu-20.04
- os: ubuntu-20.04 # this is x86_64, exclude foreign architecture
arch: aarch64
- os: ubuntu-24.04-arm # this is aarch64, exclude foreign architecture
arch: x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
Expand Down
26 changes: 21 additions & 5 deletions test/integration/cuda.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ function square!(x, y)
return nothing
end

# GPUCompiler throws "Not implemented" errors on aarch64 before
# <https://github.com/JuliaLang/julia/pull/57077> for some tests.
const skip_tests =
Base.BinaryPlatforms.arch(Base.BinaryPlatforms.HostPlatform()) == "aarch" &&
VERSION <= v"1.11.2"

@static if !Sys.isapple()
@testset "Square Kernel" begin
oA = collect(1:1:64)
Expand All @@ -26,7 +32,9 @@ end
@test all(Array(A) .≈ (oA .* oA .* 100))
@test all(Array(B) .≈ (oA .* 100))
else
@code_hlo optimize = :before_kernel square!(A, B)
@static if !skip_tests
@code_hlo optimize = :before_kernel square!(A, B)
end
end
end
end
Expand All @@ -53,7 +61,9 @@ end
@test all(Array(A) .≈ oA .* sin.(oA .* 100))
@test all(Array(B) .≈ (oA .* 100))
else
@code_hlo optimize = :before_kernel sin!(A, B)
@static if !skip_tests
@code_hlo optimize = :before_kernel sin!(A, B)
end
end
end
end
Expand All @@ -79,7 +89,9 @@ end
@jit smul!(A)
@test all(Array(A) .≈ oA .* 15)
else
@code_hlo optimize = :before_kernel smul!(A)
@static if !skip_tests
@code_hlo optimize = :before_kernel smul!(A)
end
end
end
end
Expand All @@ -104,7 +116,9 @@ tuplef2(a) = @cuda threads = 1 tuplef2!((5, a))
@jit tuplef(A)
@test all(Array(A) .≈ 3)
else
@code_hlo optimize = :before_kernel tuplef(A)
@static if !skip_tests
@code_hlo optimize = :before_kernel tuplef(A)
end
end

A = ConcreteRArray(fill(1))
Expand All @@ -120,7 +134,9 @@ tuplef2(a) = @cuda threads = 1 tuplef2!((5, a))
@jit tuplef2(A)
@test all(Array(A) .≈ 5)
else
@code_hlo optimize = :before_kernel tuplef2(A)
@static if !skip_tests
@code_hlo optimize = :before_kernel tuplef2(A)
end
end
end

Expand Down
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const REACTANT_TEST_GROUP = lowercase(get(ENV, "REACTANT_TEST_GROUP", "all"))
end

if REACTANT_TEST_GROUP == "all" || REACTANT_TEST_GROUP == "integration"
# Temporarily disabled as minutia are debugged
@safetestset "CUDA" include("integration/cuda.jl")
@safetestset "Linear Algebra" include("integration/linear_algebra.jl")
@safetestset "OffsetArrays" include("integration/offsetarrays.jl")
Expand Down

0 comments on commit 29627db

Please sign in to comment.