Skip to content

Commit

Permalink
Use CUDA_HOME when compiling nn module
Browse files Browse the repository at this point in the history
  • Loading branch information
Bertram Drost committed Oct 30, 2020
1 parent 8e1afdf commit 052fd45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/csrc/nn/setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

cuda_include='/usr/local/cuda-9.0/include'
cuda_include=os.path.join(os.environ.get('CUDA_HOME'), 'include')
os.system('nvcc src/nearest_neighborhood.cu -c -o src/nearest_neighborhood.cu.o -x cu -Xcompiler -fPIC -O2 -arch=sm_52 -I {}'.format(cuda_include))

from cffi import FFI
Expand All @@ -16,7 +16,7 @@
#include "src/ext.h"
""",
extra_objects=['src/nearest_neighborhood.cu.o',
'/usr/local/cuda-9.0/lib64/libcudart.so'],
os.path.join(os.environ.get('CUDA_HOME'),'lib64/libcudart.so')],
libraries=['stdc++']
)

Expand Down

0 comments on commit 052fd45

Please sign in to comment.