File size: 925 Bytes
ae67fe6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
import os
# Set CUDA home directory
cuda_home = os.getenv('CUDA_HOME', '/usr/local/cuda')
setup(
name='pc_util',
version='1.0',
ext_modules=[
CUDAExtension('pc_util', [
'src/pointnet2_api.cpp',
'src/ball_query.cpp',
'src/ball_query_gpu.cu',
'src/group_points.cpp',
'src/group_points_gpu.cu',
'src/interpolate.cpp',
'src/interpolate_gpu.cu',
'src/sampling.cpp',
'src/sampling_gpu.cu',
'src/cluster.cpp',
'src/cluster_gpu.cu',
],
include_dirs=[os.path.join(cuda_home, 'include')],
extra_compile_args={
'cxx': ['-g', '-O2'],
'nvcc': ['-O2', '--compiler-options', "'-fPIC'"]})
],
cmdclass={'build_ext': BuildExtension}
)
|