@@ -16,6 +16,10 @@ function square!(x, y)
1616 return nothing
1717end
1818
19+ # GPUCompiler throws "Not implemented" errors on aarch64 before
20+ # <https://github.com/JuliaLang/julia/pull/57077> for some tests.
21+ const skip_tests = Base. BinaryPlatforms. arch (Base. BinaryPlatforms. HostPlatform ()) == " aarch" && VERSION <= v " 1.11.2"
22+
1923@static if ! Sys. isapple ()
2024 @testset " Square Kernel" begin
2125 oA = collect (1 : 1 : 64 )
2630 @test all (Array (A) .≈ (oA .* oA .* 100 ))
2731 @test all (Array (B) .≈ (oA .* 100 ))
2832 else
29- @code_hlo optimize = :before_kernel square! (A, B)
33+ if ! skip_tests
34+ @code_hlo optimize = :before_kernel square! (A, B)
35+ end
3036 end
3137 end
3238end
5359 @test all (Array (A) .≈ oA .* sin .(oA .* 100 ))
5460 @test all (Array (B) .≈ (oA .* 100 ))
5561 else
56- @code_hlo optimize = :before_kernel sin! (A, B)
62+ if ! skip_tests
63+ @code_hlo optimize = :before_kernel sin! (A, B)
64+ end
5765 end
5866 end
5967end
7987 @jit smul! (A)
8088 @test all (Array (A) .≈ oA .* 15 )
8189 else
82- @code_hlo optimize = :before_kernel smul! (A)
90+ if ! skip_tests
91+ @code_hlo optimize = :before_kernel smul! (A)
92+ end
8393 end
8494 end
8595end
@@ -104,7 +114,9 @@ tuplef2(a) = @cuda threads = 1 tuplef2!((5, a))
104114 @jit tuplef (A)
105115 @test all (Array (A) .≈ 3 )
106116 else
107- @code_hlo optimize = :before_kernel tuplef (A)
117+ if ! skip_tests
118+ @code_hlo optimize = :before_kernel tuplef (A)
119+ end
108120 end
109121
110122 A = ConcreteRArray (fill (1 ))
@@ -120,7 +132,9 @@ tuplef2(a) = @cuda threads = 1 tuplef2!((5, a))
120132 @jit tuplef2 (A)
121133 @test all (Array (A) .≈ 5 )
122134 else
123- @code_hlo optimize = :before_kernel tuplef2 (A)
135+ if ! skip_tests
136+ @code_hlo optimize = :before_kernel tuplef2 (A)
137+ end
124138 end
125139end
126140
0 commit comments