warp
warp copied to clipboard
[REQ] Remove unnecessary adj_* function stubs in native code
Description
adj_* calls are not invoked when the relevant builtin has is_differentiable=False. Omitting these stubs will remove many lines of code. I think leaving empty stubs for adjoints that should exist, but aren't implemented yet, makes sense.
Agree, will be nice to use that flag for functions that don't need adjoints.
One thing to check would be that it works for things like map() functions that may try to construct calls to the adjoint directly, not sure if they will always check that flag if it's done at the C/C++ level..