@Kumar_Govindam
Please take a look at this:
‘https://pytorch.org/tutorials/advanced/cpp_extension.html 3’
You can create a cpp extension module and bind your own functions. You can not define a real c++ class, but this is similar, you have a module name and functions under the module, the only thing is that you have no constructor.