Skip to content

Commit b742809

Browse files
Only run JET tests on explicitly supported versions (#828)
* Only run JET tests on explicitly supported versions * Update test/QATest.jl Co-authored-by: David Müller-Widmann <devmotion@users.noreply.github.com> * Fix condition --------- Co-authored-by: Andreas Noack <andreas@noack.dk>
1 parent 569af35 commit b742809

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ DiffResults = "1.1"
2727
DiffRules = "1.4"
2828
DiffTests = "0.1"
2929
IrrationalConstants = "0.1, 0.2"
30-
JET = "0.9, 0.10, 0.11"
30+
JET = "0.9, 0.12"
3131
LogExpFunctions = "0.3, 1"
3232
NaNMath = "1"
3333
Preferences = "1"

test/QATest.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@ module QATest
33
using ForwardDiff
44
using Test
55

6-
using JET: @test_opt
6+
import JET
77

8-
@testset "JET" begin
9-
# issue #778
10-
@test_opt ForwardDiff.derivative(identity, 1.0)
11-
@test_opt ForwardDiff.gradient(only, [1.0], ForwardDiff.GradientConfig(only, [1.0], ForwardDiff.Chunk{1}()))
12-
@test_opt ForwardDiff.jacobian(identity, [1.0], ForwardDiff.JacobianConfig(identity, [1.0], ForwardDiff.Chunk{1}()))
13-
@test_opt ForwardDiff.hessian(only, [1.0], ForwardDiff.HessianConfig(only, [1.0], ForwardDiff.Chunk{1}()))
8+
if !isdefined(JET, :JET_AVAILABLE) || JET.JET_AVAILABLE
9+
@testset "JET" begin
10+
# issue #778
11+
JET.@test_opt ForwardDiff.derivative(identity, 1.0)
12+
JET.@test_opt ForwardDiff.gradient(only, [1.0], ForwardDiff.GradientConfig(only, [1.0], ForwardDiff.Chunk{1}()))
13+
JET.@test_opt ForwardDiff.jacobian(identity, [1.0], ForwardDiff.JacobianConfig(identity, [1.0], ForwardDiff.Chunk{1}()))
14+
JET.@test_opt ForwardDiff.hessian(only, [1.0], ForwardDiff.HessianConfig(only, [1.0], ForwardDiff.Chunk{1}()))
15+
end
1416
end
1517

1618
end # module

0 commit comments

Comments
 (0)