question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to set the CUDA path to environment variable `CUDA_PATH'

See original GitHub issue

Hello,

Im new using cupy and anaconda in linux. So im afraid to make any error in environment system.

I install cupy using the following and the installation was ok: source activate testing-env conda install -n testing-env cupy

Downloading and Extracting Packages cudnn 7.1.2: ######################################################################## | 100% cupy 4.0.0: ############################################ | 100% nccl 1.3.5:############################################################# | 100% fastrlock 0.3:############################################################ | 100%

Preparing transaction: done Verifying transaction: done Executing transaction: done

in my script I test the installation fisrtly: import cupy as cp print ‘test’

output: test

but when i modify the script to be: import numpy import cupy as cp x = cp.arange(6).reshape(2, 3).astype(‘f’) print x

i get the following:

(testing-env) [tamouze@cdr352 Python_directory]$ python "/project/6008168/tamouze/Python_directory/ali.py"
/home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/creation/ranges.py:57: UserWarning: Please set the CUDA path to environment variable `CUDA_PATH`
  _arange_ufunc(typ(start), typ(step), ret, dtype=dtype)
Traceback (most recent call last):
  File "/project/6008168/tamouze/Python_directory/ali.py", line 3, in <module>
    x = cp.arange(6).reshape(2, 3).astype('f')
  File "/home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/creation/ranges.py", line 57, in arange
    _arange_ufunc(typ(start), typ(step), ret, dtype=dtype)
  File "cupy/core/elementwise.pxi", line 826, in cupy.core.core.ufunc.__call__
  File "cupy/util.pyx", line 39, in cupy.util.memoize.decorator.ret
  File "cupy/core/elementwise.pxi", line 625, in cupy.core.core._get_ufunc_kernel
  File "cupy/core/elementwise.pxi", line 33, in cupy.core.core._get_simple_elementwise_kernel
  File "cupy/core/carray.pxi", line 146, in cupy.core.core.compile_with_cache
  File "/home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/cuda/compiler.py", line 164, in compile_with_cache
    ptx = compile_using_nvrtc(source, options, arch)
  File "/home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/cuda/compiler.py", line 82, in compile_using_nvrtc
    ptx = prog.compile(options)
  File "/home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/cuda/compiler.py", line 245, in compile
    raise CompileException(log, self.src, self.name, options)
cupy.cuda.compiler.CompileException: /home/tamouze/anaconda2/envs/testing-env/lib/python2.7/site-packages/cupy/core/include/cupy/carray.cuh(10): catastrophic error: cannot open source file "cuda_fp16.h"

1 catastrophic error detected in the compilation of "/tmp/tmplsiNNY/kern.cu".
Compilation terminated.


My environment includes the following package:

# packages in environment at /home/tamouze/anaconda2/envs/testing-env:
#
# Name                    Version                   Build  Channel
ca-certificates           2018.03.07                    0
certifi                   2018.4.16                py27_0
cudatoolkit               9.0                  h13b8566_0
cudnn                     7.1.2                 cuda9.0_0
cupy                      4.0.0            py27he3f55b6_0
fastrlock                 0.3              py27hf484d3e_0
intel-openmp              2018.0.0                      8
libedit                   3.1                  heed3624_0
libffi                    3.2.1                hd88cf55_4
libgcc-ng                 7.2.0                hdf63c60_3
libgfortran-ng            7.2.0                hdf63c60_3
libstdcxx-ng              7.2.0                hdf63c60_3
mkl                       2018.0.2                      1
mkl_fft                   1.0.1            py27h3010b51_0
mkl_random                1.0.1            py27h629b387_0
nccl                      1.3.5                 cuda9.0_0
ncurses                   6.0                  h9df7e31_2
numpy                     1.14.2           py27hdbf6ddf_1
openssl                   1.0.2o               h20670df_0
pip                       9.0.3                    py27_0
python                    2.7.14              h1571d57_31
readline                  7.0                  ha6073c6_4
setuptools                39.0.1                   py27_0
six                       1.11.0           py27h5f960f1_1
sqlite                    3.23.1               he433501_0
tk                        8.6.7                hc745277_3
wheel                     0.31.0                   py27_0
zlib                      1.2.11               ha838bed_2

Can you please help on how to set the cuda variable?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ali3assicommented, Apr 26, 2018

@kmaehashi i can confirm it is working. Thank you so much

0reactions
ali3assicommented, Apr 26, 2018

@kmaehashi

Correct me please if it is like that i should set the variable :

export CUDA_PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/gcc5.4/cuda/9.0.176
export PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/gcc5.4/cuda/9.0.176/bin:$PATH
Read more comments on GitHub >

github_iconTop Results From Across the Web

PATH & LD_LIBRARY_PATH - CUDA Setup and Installation
Set up the development environment by modifying the PATH and LD_LIBRARY_PATH variables: $ export ...
Read more >
CUDA Path Not Correctly Configured - Stack Overflow
I am trying to change my environment path variables so Pytorch can access CUDA. According to nvidia-smi, the driver can support CUDA 10.0....
Read more >
Additional Installation to Use the GPU — lfd 0.0.1 documentation
Set the environment variable CUDA_HOME to point to the CUDA home directory. Also, add the CUDA binary and library directory to your PATH...
Read more >
"unknown option for --cudapath" when installing the ...
install.sh --license $LICENSE_ID --cudapath /usr/local/cuda-9.2/ ... Can you double check if your $LICENSE_ID environment variable is set?
Read more >
how to set cuda path - MATLAB Answers - MathWorks
in the environment variables the CUDA_PATH is set to toolkit 5.0. in matlab i want the path variable to be set to toolkit...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found