Description
A lot/most of the usage of inactive_type
is in the generator of generated functions, often via generated_const
or active_reg_nothrow
. Since generators are frozen in the world age/precompilation workflow where they were defined, adding methods to inactive_type
from other packages/extensions has very limited effect. Even guess_activity
is blind to inactive_type
methods defined outside Enzyme because it uses active_reg_nothrow
, not to mention everything in jitrules.jl
. It's also a problem for certain use cases for #1852, where it's often desirable to use guaranteed_const
rather than guaranteed_const_nongen
for performance reasons.
I understand from source code comments that it's possible to explicitly add invalidation edges to generated functions. Should this be considered for generators that rely directly or indirectly on inactive_type
?