Skip to content

Commit cfc7060

Browse files
Exclude sparse det tests on non-GPL builds
1 parent 2a502ea commit cfc7060

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/rulesets/SparseArrays/sparsematrix.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,14 @@ end
7979
test_rrule(findnz, v dv, output_tangent=(zeros(length(I)), V̄))
8080
end
8181

82-
@testset "[log[abs[det]]] SparseMatrixCSC" begin
83-
ii = [1:5; 2; 4]
84-
jj = [1:5; 4; 2]
85-
x = [ones(5); 0.1; 0.1]
86-
A = sparse(ii, jj, x)
87-
test_rrule(logabsdet, A)
88-
test_rrule(logdet, A)
89-
test_rrule(det, A)
82+
if Base.USE_GPL_LIBS # these rrules don't work without CHOLMOD from SuiteSparse.jl
83+
@testset "[log[abs[det]]] SparseMatrixCSC" begin
84+
ii = [1:5; 2; 4]
85+
jj = [1:5; 4; 2]
86+
x = [ones(5); 0.1; 0.1]
87+
A = sparse(ii, jj, x)
88+
test_rrule(logabsdet, A)
89+
test_rrule(logdet, A)
90+
test_rrule(det, A)
91+
end
9092
end

0 commit comments

Comments
 (0)