Commit 00ad22e6 authored by Benjamin Thomas Graham's avatar Benjamin Thomas Graham
Browse files

Update setup.py

parent 27b3cb0b
...@@ -13,13 +13,21 @@ torch_dir = os.path.dirname(torch.__file__) ...@@ -13,13 +13,21 @@ torch_dir = os.path.dirname(torch.__file__)
print('Building SCN module') print('Building SCN module')
if torch.cuda.is_available(): if torch.cuda.is_available():
r = os.system( r = os.system(
'cd sparseconvnet/SCN; nvcc init.cu -c -o init.cu.o -ccbin /usr/bin/cc -m64 --std c++11 -Xcompiler ,\"-fopenmp\",\"-fPIC\",\"-O3\",\"-DNDEBUG\" -gencode arch=compute_52,code=sm_52 -gencode arch=compute_30,code=sm_30 -DNVCC -I/usr/local/cuda/include -I' + 'cd sparseconvnet/SCN; nvcc init.cu -c -o init.cu.o -ccbin /usr/bin/cc'
torch_dir + + ' -m64 --std c++11 -Xcompiler '
'/lib/include -I' + + ',\"-fopenmp\",\"-fPIC\",\"-O3\",\"-DNDEBUG\" '
torch_dir + + '-gencode arch=compute_62,code=sm_62 '
'/lib/include/TH -I' + + '-gencode arch=compute_61,code=sm_61 '
torch_dir + + '-gencode arch=compute_60,code=sm_60 '
'/lib/include/THC -I.') + '-gencode arch=compute_52,code=sm_52 '
+ '-gencode arch=compute_50,code=sm_50 '
+ '-gencode arch=compute_30,code=sm_30 '
+ '-DNVCC '
+ '-I/usr/local/cuda/include '
+ '-I' + torch_dir + '/lib/include '
+ '-I' + torch_dir + '/lib/include/TH '
+ '-I' + torch_dir + '/lib/include/THC '
+ '-I.')
assert r == 0 assert r == 0
ffi = create_extension( ffi = create_extension(
'sparseconvnet.SCN', 'sparseconvnet.SCN',
...@@ -60,5 +68,10 @@ setup( ...@@ -60,5 +68,10 @@ setup(
author='Facebook AI Research', author='Facebook AI Research',
author_email='benjamingraham@fb.com', author_email='benjamingraham@fb.com',
url='https://github.com/facebookresearch/SparseConvNet', url='https://github.com/facebookresearch/SparseConvNet',
package_data={
'sparseconvnet': ['SCN/_SCN.so'],
},
packages=find_packages(), packages=find_packages(),
# Since the package includes a shared object, this is not zip-safe.
zip_safe=False,
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment