torch.utils.cpp_extension
torch.utils.cpp_extension.CppExtension(name, sources, args, *kwargs)
Creates a "setuptools.Extension" for C++.
Convenience method that creates a "setuptools.Extension" with the
   bare minimum (but often sufficient) arguments to build a C++
   extension.
All arguments are forwarded to the "setuptools.Extension"
   constructor.
-[ Example ]-



from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CppExtension
setup(
   ...     name='extension',
   ...     ext_modules=[
   ...         CppExtension(
   ...             name='extension',
   ...             sources=['extension.cpp'],
   ...             extra_compile_args=['-g']),
   ...     ],
   ...     cmdclass={
   ...         'build_ext': BuildExtension
   ...     })



torch.utils.cpp_extension.CUDAExtension(name, sources, args, *kwargs)
Creates a "setuptools.Extension" for CUDA/C++.