pycuda icon indicating copy to clipboard operation
pycuda copied to clipboard

test_driver.py failure - "CUDA header does not match"

Open jmpolinski opened this issue 4 years ago • 1 comments

I am getting the following error when I run "test_driver.py":

`python3 test_driver.py
/usr/local/lib64/python3.6/site-packages/pycuda-2021.1-py3.6-linux-x86_64.egg/pycuda/driver.py:71: UserWarning: Failed to import the CUDA driver interface, with an error message indicating that the version of your CUDA header does not match the version of your CUDA driver.
  "Failed to import the CUDA driver interface, with an error "
Traceback (most recent call last):
  File "test_driver.py", line 8, in <module>
    from pycuda.tools import mark_cuda_test, dtype_to_ctype
  File "/usr/local/lib64/python3.6/site-packages/pycuda-2021.1-py3.6-linux-x86_64.egg/pycuda/tools.py", line 28, in <module>
    import pycuda.driver as cuda
  File "/usr/local/lib64/python3.6/site-packages/pycuda-2021.1-py3.6-linux-x86_64.egg/pycuda/driver.py", line 65, in <module>
    from pycuda._driver import *  # noqa
ImportError: /usr/local/lib64/python3.6/site-packages/pycuda-2021.1-py3.6-linux-x86_64.egg/pycuda/_driver.cpython-36m-x86_64-linux-gnu.so: undefined symbol: cuDevicePrimaryCtxRelease_v2
`

It seems to have something to do with the "_v2" but I'm not sure how to get it working.

jmpolinski avatar Jul 12 '21 20:07 jmpolinski

_v2

I had the same issue as this, when installing pycuda on a system with an older NVIDIA TITAN V card. The nvidia-smi reported CUDA 10.1, but the conda install of pycuda said no compatible versions were found since pycuda-2020.1 required CUDA >=10.2

By forcing pip install pycuda==2019.1 I seem to have worked around this undefined symbol: cuDevicePrimaryCtxRelease_v2 issue.

cmkewish avatar Dec 04 '23 21:12 cmkewish