Skip to content

Commit 3a1d161

Browse files
Sébastien LoiselSébastien Loisel
authored andcommitted
Fix CI compatibility: remove Metal from test targets
- Remove Metal from [targets] test so Linux CI doesn't try to install macOS-only Metal.jl as a test dependency - Metal still works on macOS via the package extension mechanism - Fix GPU test: pre-compute SVector outside lambda to avoid capturing Type{T} which is not isbits and cannot be passed to GPU kernels
1 parent b81a73c commit 3a1d161

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3636
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3737

3838
[targets]
39-
test = ["Random", "Test", "Metal"]
39+
test = ["Random", "Test"]

test/test_map_rows.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ for (T, to_backend, backend_name) in TestUtils.ALL_CONFIGS
6565
println(io0(), "[test] f returns SVector -> MatrixMPI ($T, $backend_name)")
6666

6767
A4 = to_backend(MatrixMPI(T.([1.0 2.0; 3.0 4.0; 5.0 6.0])))
68-
result4 = map_rows(r -> SVector(T(1), T(2), T(3)), A4)
68+
# Pre-compute constant SVector for GPU (capturing Type{T} is not isbits)
69+
const_sv = SVector{3,T}(T(1), T(2), T(3))
70+
result4 = map_rows(r -> const_sv, A4)
6971
expected4 = T.([1 2 3; 1 2 3; 1 2 3])
7072
@test norm(Matrix(result4) - expected4) < TOL
7173
@test size(result4) == (3, 3)

0 commit comments

Comments
 (0)