@alanzhai219 I checked Peter’s tutorial. Essentially we are creating a C++ function that is bonded to Python using Pybind11. There is no base class of the custom op to inherit in PyTorch C++, where TensorFlow provides a base class of the custom op for users to extend.