-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Description
Currently, Warp relies on a combination of wp.config.enable_backward
, module-level "enable_backward"
, and kernel-level "enable_backward"
to decide whether adjoint code should be generated and compiled.
We'd like to explore redesigning this approach to instead compile adjoint kernels on an as-needed basis such as when tape.backward()
or wp.launch(..., adjoint=True)
is used.
This could result in more compilation overhead for the cases requiring adjoint code, so we will need to measure this impact.
Context
Related to #903, we want to improve the user experience when it comes to compile times. In some projects like Newton, it is not feasible to compile adjoint code for all modules by default, but enabling adjoint code on a per-module basis can also be burdensome.