Closed xytintel closed 1 week ago
CompositeExplicitAutograd
(previously known as DefaultBackend
):
implementations of kernels that work for all backends, but require an
explicit definition of backward function in derivatives.yaml
to support autograd.
The most typical use of this key are for delegating functions; i.e.,
functions that do a very small amount of work and then delegate to another
operator to do the actual heavy lifting. Under the hood, registering a
kernel to CompositeExplicitAutograd
is equivalent to registering that
kernel to every backend (e.g., CPU, CUDA
). Note: kernels which call
DispatchStub should NOT be registered as CompositeExplicitAutograd, as
DispatchStub only works for CPU, CUDA
)The conclusion is that we don't need it.
🚀 The feature, motivation and pitch
Whether
CompositeExplicitAugograd
codegen flag is needed requires further investigation.Alternatives
No response
Additional context
No response