From 29627dbbd69d65dc6875f9d0b5eae2965cf6a714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= <765740+giordano@users.noreply.github.com> Date: Tue, 21 Jan 2025 01:50:51 +0100 Subject: [PATCH] [CI] Move tests on aarch64 linux to GitHub Actions (#543) * [CI] Move tests on aarch64 linux to GitHub Actions * Fix name of aarch64-linux runners Co-authored-by: Ian McInerney * Skip CUDA integration tests that could fail --------- Co-authored-by: Ian McInerney --- .buildkite/pipeline.yml | 37 ------------------------------------- .github/workflows/CI.yml | 6 ++++-- test/integration/cuda.jl | 26 +++++++++++++++++++++----- test/runtests.jl | 1 - 4 files changed, 25 insertions(+), 45 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9a9014b64..ef3363f69 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -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" diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f500982f1..bd7102079 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -43,6 +43,7 @@ jobs: # - 'nightly' os: - ubuntu-20.04 + - ubuntu-24.04-arm - macOS-latest test_group: - core @@ -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 diff --git a/test/integration/cuda.jl b/test/integration/cuda.jl index 4ec52ab86..8cb3475bb 100644 --- a/test/integration/cuda.jl +++ b/test/integration/cuda.jl @@ -16,6 +16,12 @@ function square!(x, y) return nothing end +# GPUCompiler throws "Not implemented" errors on aarch64 before +# 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) @@ -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 @@ -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 @@ -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 @@ -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)) @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 7d188fe3d..be1775004 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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")