File tree Expand file tree Collapse file tree 2 files changed +6
-15
lines changed
ext/DifferentiationInterfaceEnzymeExt Expand file tree Collapse file tree 2 files changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ function HINT_START(option)
5
5
end
6
6
7
7
function __init__ ()
8
+ if ! isdefined (Base. Experimental, :register_error_hint )
9
+ return nothing
10
+ end
8
11
# robust against internal changes
9
12
condition = (
10
13
isdefined (Enzyme, :Compiler ) &&
@@ -28,16 +31,8 @@ function __init__()
28
31
bold= true ,
29
32
)
30
33
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 )
40
34
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
41
36
end
42
37
end
43
38
end
Original file line number Diff line number Diff line change 152
152
@test occursin (" AutoEnzyme" , msg)
153
153
@test occursin (" function_annotation" , msg)
154
154
@test occursin (" ADTypes" , msg)
155
- @test occursin (" DifferentiationInterface" , msg)
156
155
end
157
156
158
157
@testset " RuntimeActivityError" begin
181
180
catch e
182
181
end
183
182
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)
189
185
end
190
186
end
191
187
You can’t perform that action at this time.
0 commit comments