You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation takes the entire trace of the cassette pass and operates on it. which makes it heavy in terms of space and time. possible improvement options:
generate the graph in-place during the cassette pass instead of a trace
do not trace function calls for functions in ignorelist.
@oxinabox can you help me with option 2?
Specifically how to tell Cassette to not overdub certain functions that may occur inside the called function?
The text was updated successfully, but these errors were encountered:
since that will get rid of the default behavour of recursively overloading.
So to do a list of such functions.
for func in ignorelist
@eval Cassette.overdub(ctx::TraceCtx, ::typeof($func), args...) = $func(args...)
end
BTW:
It might be easier to work with just overdub rather than prehook and posthook
function Cassette.overdub(ctx::TraceCtx, f, args...)
enter!(ctx.metadata, f, args...)
try
if Cassette.canrecurse(f, args...)
return Cassette.recurse(f, args...)
else
return Cassette.fallback(f, args...)
end
finally
exit!(ctx.metadata, f, args...)
end
end
The current implementation takes the entire trace of the cassette pass and operates on it. which makes it heavy in terms of space and time. possible improvement options:
ignorelist
.@oxinabox can you help me with option 2?
Specifically how to tell Cassette to not overdub certain functions that may occur inside the called function?
The text was updated successfully, but these errors were encountered: