Skip to content

Commit d0163a0

Browse files
penelopeysmwsmoses
authored andcommitted
mark function as const for good measure
1 parent 307c1d1 commit d0163a0

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

test/ad.jl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,20 @@ if INCLUDE_MOONCAKE
203203
push!(ADTYPES, AutoMooncake(; config=nothing))
204204
end
205205
if INCLUDE_ENZYME
206-
push!(ADTYPES, AutoEnzyme(; mode=Enzyme.set_runtime_activity(Enzyme.Forward)))
207-
push!(ADTYPES, AutoEnzyme(; mode=Enzyme.set_runtime_activity(Enzyme.Reverse)))
206+
push!(
207+
ADTYPES,
208+
AutoEnzyme(;
209+
mode=Enzyme.set_runtime_activity(Enzyme.Forward),
210+
function_annotation=Enzyme.Const,
211+
),
212+
)
213+
push!(
214+
ADTYPES,
215+
AutoEnzyme(;
216+
mode=Enzyme.set_runtime_activity(Enzyme.Reverse),
217+
function_annotation=Enzyme.Const,
218+
),
219+
)
208220
end
209221

210222
# Check that ADTypeCheckContext itself works as expected.

0 commit comments

Comments
 (0)