Skip to content

Commit

Permalink
ammend install instructions and check for env-var to link against cud…
Browse files Browse the repository at this point in the history
…a libs
  • Loading branch information
quasiben committed Feb 25, 2019
1 parent 40b04c0 commit efff284
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ $ git clone --recurse-submodules https://github.com/rapidsai/cuml.git
$ cd cuML
$ mkdir build
$ cd build
$ export CUDA_BIN_PATH=$CUDA_HOME # (optional CUDA_HOME=/path/to/cuda/)
$ cmake ..
```

Expand All @@ -39,7 +40,7 @@ Cannot generate a safe runtime search path for target ml_test because files
in some directories may conflict with libraries in implicit directories:
```

The configuration script will print the BLAS found on the search path. If the version found does not match the version intended, use the flag `-DBLAS_LIBRARIES=/path/to/blas.so` with the `cmake` command to force your own version.
The configuration script will print the BLAS found on the search path. If the version found does not match the version intended, use the flag `-DBLAS_LIBRARIES=/path/to/blas.so` with the `cmake` command to force your own version.


3. Build `libcuml`:
Expand Down
8 changes: 7 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from Cython.Build import cythonize
import versioneer
from distutils.sysconfig import get_python_lib
import os


install_requires = [
Expand All @@ -28,6 +29,11 @@

cython_files = ['cuML/cuml.pyx']

cuda_lib_dir = '/usr/local/cuda/include'

if os.environ.get('CUDA_HOME', False):
cuda_lib_dir = os.path.join(os.environ.get('CUDA_HOME'), 'include')

extensions = [
Extension("cuml",
sources=cython_files,
Expand All @@ -37,7 +43,7 @@
'../cuML/external/ml-prims/external/cutlass',
'../cuML/external/cutlass',
'../cuML/external/ml-prims/external/cub',
'/usr/local/cuda/include'],
cuda_lib_dir],
library_dirs=[get_python_lib()],
libraries=['cuda', 'cuml'],
language='c++',
Expand Down

0 comments on commit efff284

Please sign in to comment.