We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eed80e5 commit ea52a85Copy full SHA for ea52a85
src/model.jl
@@ -931,7 +931,13 @@ end
931
932
Evaluate the `model` with the arguments matching the given `context` and `varinfo` object.
933
"""
934
-function _evaluate!!(model::Model, varinfo::AbstractVarInfo, context::AbstractContext)
+@noinline function _evaluate!!(
935
+ model::Model, varinfo::AbstractVarInfo, context::AbstractContext
936
+)
937
+ # NOTE(penelopeysm): This @noinline is a workaround for
938
+ # https://github.com/EnzymeAD/Enzyme.jl/issues/2337 and only really affects
939
+ # the smallest models (e.g. those with a single parameter). This call can
940
+ # be removed once that issue is fixed.
941
args, kwargs = make_evaluate_args_and_kwargs(model, varinfo, context)
942
return model.f(args...; kwargs...)
943
end
0 commit comments