@@ -23,43 +23,45 @@ using Test
2323# `@test_throws`. Consequently `@test_throws` doesn't actually see any error. Weird Julia
2424# behaviour.
2525
26- @testset " Enzyme: Bijectors.find_alpha" begin
27- x = randn ()
28- y = expm1 (randn ())
29- z = randn ()
26+ @static if VERSION < v " 1.11"
27+ @testset " Enzyme: Bijectors.find_alpha" begin
28+ x = randn ()
29+ y = expm1 (randn ())
30+ z = randn ()
3031
31- @testset " forward" begin
32- # No batches
33- @testset for RT in (Const, Duplicated, DuplicatedNoNeed),
34- Tx in (Const, Duplicated),
35- Ty in (Const, Duplicated),
36- Tz in (Const, Duplicated)
32+ @testset " forward" begin
33+ # No batches
34+ @testset for RT in (Const, Duplicated, DuplicatedNoNeed),
35+ Tx in (Const, Duplicated),
36+ Ty in (Const, Duplicated),
37+ Tz in (Const, Duplicated)
3738
38- test_forward (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
39- end
39+ test_forward (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
40+ end
4041
41- # Batches
42- @testset for RT in (Const, BatchDuplicated, BatchDuplicatedNoNeed),
43- Tx in (Const, BatchDuplicated),
44- Ty in (Const, BatchDuplicated),
45- Tz in (Const, BatchDuplicated)
42+ # Batches
43+ @testset for RT in (Const, BatchDuplicated, BatchDuplicatedNoNeed),
44+ Tx in (Const, BatchDuplicated),
45+ Ty in (Const, BatchDuplicated),
46+ Tz in (Const, BatchDuplicated)
4647
47- test_forward (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
48+ test_forward (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
49+ end
4850 end
49- end
50- @testset " reverse" begin
51- # No batches
52- @testset for RT in (Const, Active),
53- Tx in (Const, Active),
54- Ty in (Const, Active),
55- Tz in (Const, Active)
51+ @testset " reverse" begin
52+ # No batches
53+ @testset for RT in (Const, Active),
54+ Tx in (Const, Active),
55+ Ty in (Const, Active),
56+ Tz in (Const, Active)
5657
57- test_reverse (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
58- end
58+ test_reverse (Bijectors. find_alpha, RT, (x, Tx), (y, Ty), (z, Tz))
59+ end
5960
60- # TODO : Test batch mode
61- # This is a bit problematic since Enzyme does not support all combinations of activities currently
62- # https://github.com/TuringLang/Bijectors.jl/pull/350#issuecomment-2480468728
61+ # TODO : Test batch mode
62+ # This is a bit problematic since Enzyme does not support all combinations of activities currently
63+ # https://github.com/TuringLang/Bijectors.jl/pull/350#issuecomment-2480468728
64+ end
6365 end
6466end
6567
0 commit comments