PyTorch Custom Operators
PyTorch offers a large library of operators that work on Tensors (e.g. torch.add,
torch.sum, etc). However, you may wish to bring a new custom operation to PyTorch
and get it to work with subsystems like torch.compile, autograd, and .
In order to do so, you must register the custom operation with PyTorch via the Python
or C++
APIs.