custom_op
¶
Classes¶
fastvideo.layers.custom_op.CustomOp
¶
Bases: Module
Base class for custom ops. Dispatches the forward method to the appropriate backend.
Source code in fastvideo/layers/custom_op.py
Functions¶
fastvideo.layers.custom_op.CustomOp.default_on
staticmethod
¶
default_on() -> bool
On by default if level < CompilationLevel.PIECEWISE Specifying 'all' or 'none' in custom_op takes precedence.
fastvideo.layers.custom_op.CustomOp.forward_native
¶
forward_native(*args, **kwargs) -> Any
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.