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
I'd say reserve is a reasonable function to provide a custom-derivative for @wsmoses , what would we need to register?
Augmented primal is just a reserve for the same additional on the shadow, and do nothing for the reverse?
For context, that's the definition:
Gett all names for relevant vector reserve calls (here e.g. _ZN5alloc3vec16Vec$LT$T$C$A$GT$7reserve17hfbf4bb7fa5035d73E).
2A) Call EnzymeRegisterCallHandler (?), using the name from 1)
2B) Pass a nullptr as CustomFunctionReverse since it shouldn't need anything in the reverse pass
2C) Pass a Builder and gutils as first and third argument to the CustomAugmentedFunctionForward
2D) Pass callinst to the reserve() call from 1) as the second arg to CustomAugmentedFunctionForward
2E) do something (??) with the last three arguments of CustomAugmentedFunctionForward
Reproducer:
RUSTFLAGS="-Z autodiff=LooseTypes,Print" cargo +enzyme run
mod.ll.txt
Demangled function names:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2fdf75b03825f5f63f353ff1122f3e0f
Demangled function names are:
I'd say reserve is a reasonable function to provide a custom-derivative for @wsmoses , what would we need to register?
Augmented primal is just a reserve for the same additional on the shadow, and do nothing for the reverse?
For context, that's the definition:
This example and some playing around in release mode indicates we should also have a custom rule for
alloc::raw_vec::RawVecInner<A>::reserve::do_reserve_and_handle
https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=3d81e4ea9dcd7abd8acace3d9e40685c
The text was updated successfully, but these errors were encountered: