3 from setuptools
import setup
7 CXX_FLAGS = []
if sys.platform ==
'win32' else [
'-g',
'-Werror']
11 'torch_test_cpp_extension.cpp', [
'extension.cpp'],
12 extra_compile_args=CXX_FLAGS),
14 'torch_test_cpp_extension.msnpu', [
'msnpu_extension.cpp'],
15 extra_compile_args=CXX_FLAGS),
19 extension = CUDAExtension(
20 'torch_test_cpp_extension.cuda', [
22 'cuda_extension_kernel.cu',
23 'cuda_extension_kernel2.cu',
25 extra_compile_args={
'cxx': CXX_FLAGS,
27 ext_modules.append(extension)
30 name=
'torch_test_cpp_extension',
31 packages=[
'torch_test_cpp_extension'],
32 ext_modules=ext_modules,
33 cmdclass={
'build_ext': BuildExtension})