Skip to content

Commit db4340d

Browse files
committed
skip a gradient
1 parent 1195cfe commit db4340d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/gradients.jl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ end
1616

1717
@testset "simple" begin
1818

19-
if Tullio._GRAD[] != :Dual || VERSION >= v"1.5" # These 3 give errors on Julia 1.4, LV 0.8, I have no idea why.
20-
2119
@test _gradient(x -> sum(@tullio y[i] := 2*x[i]), rand(3))[1] == [2,2,2]
2220
@test _gradient(x -> sum(@tullio y[i] := 2*x[i] + i), rand(3))[1] == [2,2,2]
2321

@@ -32,7 +30,6 @@ if Tullio._GRAD[] != :Dual || VERSION >= v"1.5" # These 3 give errors on Julia 1
3230
g_fd = ForwardDiff.gradient(x -> sum(sin, g2(x)), r100)
3331
@test g_fd _gradient(x -> sum(sin, g2(x)), r100)[1]
3432

35-
end
3633
r100 = randn(100)
3734

3835
# scalar output
@@ -216,8 +213,8 @@ end
216213
@test gradtest(con14, (3,3,9,9))
217214

218215
## scalar -- one with :=, one without
219-
sc1(x) = @tullio s = r22[b,β] * x[a,b,c] * r312[c,a,β]
220-
@test gradtest(sc1, (1,2,3))
216+
sc1(x) = @tullio s = r22[b,β] * x[a,b,c] * r312[c,a,β] avx=false
217+
@test gradtest(sc1, (1,2,3)) # UndefVarError: ####op#798_0 not defined
221218

222219
sc2(x) = @tullio s := x[γ,c] * r3399[c,γ,i,i]
223220
@test gradtest(sc2, (3,3))

0 commit comments

Comments
 (0)