warp icon indicating copy to clipboard operation
warp copied to clipboard

[REQ] Remove unnecessary adj_* function stubs in native code

Open daedalus5 opened this issue 3 months ago • 2 comments

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.

daedalus5 avatar Sep 26 '25 16:09 daedalus5

Agree, will be nice to use that flag for functions that don't need adjoints.

mmacklin avatar Oct 13 '25 03:10 mmacklin

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..

mmacklin avatar Oct 13 '25 03:10 mmacklin