fastvideo.v1.layers.custom_op
#
Module Contents#
Classes#
Base class for custom ops. Dispatches the forward method to the appropriate backend. |
Data#
API#
- class fastvideo.v1.layers.custom_op.CustomOp[source]#
Bases:
torch.nn.Module
Base class for custom ops. Dispatches the forward method to the appropriate backend.
Initialization
Initialize internal Module state, shared by both nn.Module and ScriptModule.
- abstract static default_on() bool [source]#
On by default if level < CompilationLevel.PIECEWISE Specifying βallβ or βnoneβ in custom_op takes precedence.
- dispatch_forward() collections.abc.Callable [source]#
- abstract forward_native(*args, **kwargs) Any [source]#
PyTorch-native implementation of the forward method. This method is optional. If implemented, it can be used with compilers such as torch.compile or PyTorch XLA. Also, it can be used for testing purposes.
- classmethod register(name: str) collections.abc.Callable [source]#