File tree Expand file tree Collapse file tree
test/rules/internal_rules Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ using Test
1515
1616 p = [1.0 , 2.0 ]
1717 grad = Enzyme. gradient (Enzyme. set_runtime_activity (Enzyme. Reverse), loss_fallback, p)
18- @test grad ≈ [2.0 , 2.0 ]
18+ @test only ( grad) ≈ [2.0 , 2.0 ]
1919 end
2020
2121 @testset " circular reference" begin
@@ -37,7 +37,7 @@ using Test
3737
3838 p = [1.0 , 1.0 ]
3939 grad = Enzyme. gradient (Enzyme. set_runtime_activity (Enzyme. Reverse), loss_cyclic, p)
40- @test grad ≈ [8.0 , 8.0 ]
40+ @test only ( grad) ≈ [8.0 , 8.0 ]
4141 end
4242
4343 @testset " multiple nested structs" begin
@@ -61,6 +61,6 @@ using Test
6161 p = [1.0 , 2.0 ]
6262 grad = Enzyme. gradient (Enzyme. set_runtime_activity (Enzyme. Reverse), loss_tree, p)
6363 # sum(10p) * 3 = 30 * sum(p) -> gradient is [30.0, 30.0]
64- @test grad ≈ [30.0 , 30.0 ]
64+ @test only ( grad) ≈ [30.0 , 30.0 ]
6565 end
6666end
You can’t perform that action at this time.
0 commit comments