File tree Expand file tree Collapse file tree
ext/DifferentiationInterfaceEnzymeExt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ function HINT_START(option)
55end
66
77function __init__ ()
8+ if ! isdefined (Base. Experimental, :register_error_hint )
9+ return nothing
10+ end
811 # robust against internal changes
912 condition = (
1013 isdefined (Enzyme, :Compiler ) &&
@@ -28,16 +31,8 @@ function __init__()
2831 bold= true ,
2932 )
3033 printstyled (io, HINT_END; italic= true )
31- elseif occursin (" EnzymeRuntimeActivityError" , string (nameof (T)))
32- printstyled (io, HINT_START (" mode" ); bold= true )
33- printstyled (
34- io,
35- " \n\n\t AutoEnzyme(; mode=Enzyme.set_runtime_activity(Enzyme.Forward))\n\t AutoEnzyme(; mode=Enzyme.set_runtime_activity(Enzyme.Reverse))" ;
36- color= :cyan ,
37- bold= true ,
38- )
39- printstyled (io, HINT_END; italic= true )
4034 end
35+ # EnzymeRuntimeActivityError is no longer a concrete type since https://github.com/EnzymeAD/Enzyme.jl/pull/2555 (now a UnionAll) so we cannot define a hint
4136 end
4237 end
4338 end
Original file line number Diff line number Diff line change 152152 @test occursin (" AutoEnzyme" , msg)
153153 @test occursin (" function_annotation" , msg)
154154 @test occursin (" ADTypes" , msg)
155- @test occursin (" DifferentiationInterface" , msg)
156155 end
157156
158157 @testset " RuntimeActivityError" begin
181180 catch e
182181 end
183182 msg = sprint (showerror, e)
184- @test occursin (" AutoEnzyme" , msg)
185- @test occursin (" mode" , msg)
186- @test occursin (" set_runtime_activity" , msg)
187- @test occursin (" ADTypes" , msg)
188- @test occursin (" DifferentiationInterface" , msg)
183+ @test_broken occursin (" AutoEnzyme" , msg)
184+ @test_broken occursin (" ADTypes" , msg)
189185 end
190186end
191187
You can’t perform that action at this time.
0 commit comments