WatsonTang98 commited on
Commit
ae67fe6
1 Parent(s): baa96e2

Upload setup.py

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