WatsonTang98 commited on
Commit
1ab4a36
·
verified ·
1 Parent(s): 32f35f1

Upload setup.py

Browse files
Files changed (1) hide show
  1. pc_util/setup.py +33 -0
pc_util/setup.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from setuptools import setup
3
+ from torch.utils.cpp_extension import BuildExtension, CUDAExtension
4
+
5
+ # Set environment variables for compilers
6
+ os.environ['CC'] = '/usr/bin/gcc'
7
+ os.environ['CXX'] = '/usr/bin/g++'
8
+ os.environ['CUDAHOSTCXX'] = '/usr/bin/g++'
9
+
10
+ setup(
11
+ name='pc_util',
12
+ version='1.0',
13
+ ext_modules=[
14
+ CUDAExtension('pc_util', [
15
+ 'src/pointnet2_api.cpp',
16
+ 'src/ball_query.cpp',
17
+ 'src/ball_query_gpu.cu',
18
+ 'src/group_points.cpp',
19
+ 'src/group_points_gpu.cu',
20
+ 'src/interpolate.cpp',
21
+ 'src/interpolate_gpu.cu',
22
+ 'src/sampling.cpp',
23
+ 'src/sampling_gpu.cu',
24
+ 'src/cluster.cpp',
25
+ 'src/cluster_gpu.cu',
26
+ ], extra_compile_args={
27
+ 'cxx': ['-g', '-O2'],
28
+ 'nvcc': ['-O2',
29
+ '-I/usr/local/cuda-12.1/include'
30
+ ]})
31
+ ],
32
+ cmdclass={'build_ext': BuildExtension}
33
+ )