Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to cuInit results in CUDA_ERROR_NO_DEVICE: #5793

Closed
humezawa opened this issue Jun 1, 2020 · 8 comments
Closed

Call to cuInit results in CUDA_ERROR_NO_DEVICE: #5793

humezawa opened this issue Jun 1, 2020 · 8 comments
Labels
question Notes an issue as a question

Comments

@humezawa
Copy link

humezawa commented Jun 1, 2020

There is my code

import os
from numba import cuda
import numpy as np

to measure exec time

from timeit import default_timer as timer

n = 10000000

os.environ["CUDA_VISIBLE_DEVICES"]="-1"

threadsperblock = 32
blockspergrid = (n + (threadsperblock - 1)) // threadsperblock

function optimized to run on gpu

@cuda.jit()
def func2(a):
print('ok')

a = np.ones(n, dtype = np.float64)

start = timer()
func2blockspergrid, threadsperblock
print("with GPU:", timer()-start)

I am working on spyder in windows and downloaded all my packages using conda.
every time I run my code there is the output.

CudaAPIError: Call to cuInit results in CUDA_ERROR_NO_DEVICE
CudaSupportError: Error at driver init:
[100] Call to cuInit results in CUDA_ERROR_NO_DEVICE:

@humezawa
Copy link
Author

humezawa commented Jun 1, 2020

And the information by running numba -s

@humezawa
Copy link
Author

humezawa commented Jun 1, 2020

Time Stamp
2020-06-01 14:24:53.951255

Hardware Information
Machine : AMD64
CPU Name : haswell
CPU count : 8
CPU Features :
64bit aes avx avx2 bmi bmi2 cmov cx16 f16c fma fsgsbase invpcid lzcnt mmx movbe
pclmul popcnt rdrnd sahf sse sse2 sse3 sse4.1 sse4.2 ssse3 xsave xsaveopt

OS Information
Platform : Windows-10-10.0.18362-SP0
Release : 10
System Name : Windows
Version : 10.0.18362
OS specific info : 1010.0.18362SP0

Python Information
Python Compiler : MSC v.1916 64 bit (AMD64)
Python Implementation : CPython
Python Version : 3.7.7
Python Locale : en_US cp1252

LLVM information
LLVM version : 8.0.0

CUDA Information
Found 1 CUDA devices
id 0 b'GeForce GTX 960M' [SUPPORTED]
compute capability: 5.0
pci device id: 0
pci bus id: 1
Summary:
1/1 devices are supported
CUDA driver version : 11000
CUDA libraries:
Finding cublas from Conda environment
named cublas64_10.dll
trying to open library... ok
Finding cusparse from Conda environment
named cusparse64_10.dll
trying to open library... ok
Finding cufft from Conda environment
named cufft64_10.dll
trying to open library... ok
Finding curand from Conda environment
named curand64_10.dll
trying to open library... ok
Finding nvvm from Conda environment
named nvvm64_33_0.dll
trying to open library... ok
Finding libdevice from Conda environment
searching for compute_20... ok
searching for compute_30... ok
searching for compute_35... ok
searching for compute_50... ok

ROC Information
ROC available : False
Error initialising ROC due to : No ROC toolchains found.
No HSA Agents found, encountered exception when searching:
Error at driver init:

HSA is not currently supported on this platform (win32).
:

SVML Information
SVML state, config.USING_SVML : True
SVML library found and loaded : True
llvmlite using SVML patched LLVM : True
SVML operational : True

Threading Layer Information
TBB Threading layer available : True
OpenMP Threading layer available : True
+--> Vendor: : MS
Workqueue Threading layer available : True

Numba Environment Variable Information
None set.

Conda Information
conda_build_version : 3.18.11
conda_env_version : 4.8.3
platform : win-64
python_version : 3.7.6.final.0
root_writable : True

Current Conda Env
_r-mutex 1.0.0 anacondar_1
_tflow_select 2.1.0 gpu anaconda
absl-py 0.9.0 py37_0 anaconda
alabaster 0.7.12 py37_0
argh 0.26.2 py37_0
astor 0.8.0 py37_0 anaconda
astroid 2.4.1 py37_0
atomicwrites 1.4.0 py_0
attrs 19.3.0 py_0
autopep8 1.4.4 py_0
babel 2.8.0 py_0
backcall 0.1.0 py37_0
bcrypt 3.1.7 py37he774522_0
blas 1.0 mkl
bleach 3.1.4 py_0
blinker 1.4 py37_0 anaconda
ca-certificates 2020.1.1 0
cachetools 3.1.1 py_0 anaconda
certifi 2020.4.5.1 py37_0
cffi 1.14.0 py37h7a1dbc1_0
chardet 3.0.4 py37_1003
click 7.1.2 py_0 anaconda
cloudpickle 1.3.0 pypi_0 pypi
colorama 0.4.3 py_0
cryptography 2.9.2 py37h7a1dbc1_0
cudatoolkit 10.1.243 h74a9793_0
cudnn 7.6.5 cuda10.1_0 anaconda
cycler 0.10.0 py37_0
decorator 4.4.2 py_0
defusedxml 0.6.0 py_0
diff-match-patch 20181111 py_0
docutils 0.16 py37_0
entrypoints 0.3 py37_0
flake8 3.8.2 py_0
freetype 2.9.1 ha9979f8_1
future 0.18.2 py37_0
gast 0.2.2 py37_0 anaconda
google-auth 1.14.1 py_0 anaconda
google-auth-oauthlib 0.4.1 py_2 anaconda
google-pasta 0.2.0 py_0 anaconda
grpcio 1.27.2 py37h351948d_0 anaconda
gym 0.17.2 pypi_0 pypi
h5py 2.8.0 py37hf7173ca_0 anaconda
hdf5 1.8.18 vc14h7a021fe_0 [vc14] anaconda
icc_rt 2019.0.0 h0cc432a_1
icu 64.2 he025d50_1 conda-forge
idna 2.9 py_1
imagesize 1.2.0 py_0
importlib-metadata 1.6.0 py37_0
importlib_metadata 1.6.0 0
intel-openmp 2019.4 245
intervaltree 3.0.2 py_0
ipykernel 5.1.4 py37h39e3cac_0
ipython 7.13.0 py37h5ca1d4c_0
ipython_genutils 0.2.0 py37_0
isort 4.3.21 py37_0
jedi 0.15.2 py37_0
jinja2 2.11.2 py_0
joblib 0.15.1 py_0
jpeg 9c hfa6e2cd_1001 conda-forge
jsonschema 3.2.0 py37_0
jupyter_client 6.1.3 py_0
jupyter_core 4.6.3 py37_0
keras-applications 1.0.8 py_0 anaconda
keras-base 2.3.1 py37_0 anaconda
keras-gpu 2.3.1 0 anaconda
keras-preprocessing 1.1.0 py_1 anaconda
keyring 21.1.1 py37_2
kiwisolver 1.2.0 py37h74a9793_0
lazy-object-proxy 1.4.3 py37he774522_0
libblas 3.8.0 14_mkl conda-forge
libcblas 3.8.0 14_mkl conda-forge
libclang 9.0.1 default_hf44288c_0
liblapack 3.8.0 14_mkl conda-forge
liblapacke 3.8.0 14_mkl conda-forge
libpng 1.6.37 h2a8f88b_0
libprotobuf 3.11.4 h7bd577a_0 anaconda
libsodium 1.0.16 h9d3ae62_0
libspatialindex 1.9.3 h33f27b4_0
libtiff 4.1.0 h56a325e_0
libwebp 1.0.1 he774522_0
llvmlite 0.32.1 py37ha925a31_0
m2w64-bwidget 1.9.10 2
m2w64-bzip2 1.0.6 6
m2w64-expat 2.1.1 2
m2w64-fftw 3.3.4 6
m2w64-flac 1.3.1 3
m2w64-gcc-libgfortran 5.3.0 6
m2w64-gcc-libs 5.3.0 7
m2w64-gcc-libs-core 5.3.0 7
m2w64-gettext 0.19.7 2
m2w64-gmp 6.1.0 2
m2w64-gsl 2.1 2
m2w64-libiconv 1.14 6
m2w64-libjpeg-turbo 1.4.2 3
m2w64-libogg 1.3.2 3
m2w64-libpng 1.6.21 2
m2w64-libsndfile 1.0.26 2
m2w64-libtiff 4.0.6 2
m2w64-libvorbis 1.3.5 2
m2w64-libwinpthread-git 5.0.0.4634.697f757 2
m2w64-libxml2 2.9.3 4
m2w64-mpfr 3.1.4 4
m2w64-openblas 0.2.19 1
m2w64-pcre 8.38 2
m2w64-speex 1.2rc2 3
m2w64-speexdsp 1.2rc3 3
m2w64-tcl 8.6.5 3
m2w64-tk 8.6.5 3
m2w64-tktable 2.10 5
m2w64-wineditline 2.101 5
m2w64-xz 5.2.2 2
m2w64-zlib 1.2.8 10
markdown 3.1.1 py37_0 anaconda
markupsafe 1.1.1 py37he774522_0
matplotlib 3.1.3 py37_0 anaconda
matplotlib-base 3.1.3 py37h64f37c6_0
mccabe 0.6.1 py37_1
mistune 0.8.4 py37he774522_0
mkl 2019.4 245
mkl-service 2.3.0 py37hb782905_0
mkl_fft 1.0.15 py37h14836fe_0
mkl_random 1.1.0 py37h675688f_0
msys2-conda-epoch 20160418 1
nbconvert 5.6.1 py37_0
nbformat 5.0.6 py_0
numba 0.49.1 py37h47e9c7a_0
numpy 1.18.1 py37h93ca92e_0
numpy-base 1.18.1 py37hc3f5095_1
numpydoc 0.9.2 py_0
oauthlib 3.1.0 py_0 anaconda
olefile 0.46 py37_0
opencv 4.1.1 py37he03da11_2 conda-forge/label/cf202003
openssl 1.1.1g he774522_0
opt_einsum 3.1.0 py_0 anaconda
packaging 20.3 py_0
pandas 1.0.3 py37h47e9c7a_0 anaconda
pandoc 2.2.3.2 0
pandocfilters 1.4.2 py37_1
paramiko 2.7.1 py_0
parso 0.5.2 py_0
pathtools 0.1.2 py_1
pexpect 4.8.0 py37_0
pickleshare 0.7.5 py37_0
pillow 7.1.2 py37hcc1f983_0
pip 20.0.2 py37_3
pluggy 0.13.1 py37_0
prompt-toolkit 3.0.4 py_0
prompt_toolkit 3.0.4 0
protobuf 3.11.4 py37h33f27b4_0 anaconda
psutil 5.7.0 py37he774522_0
pyasn1 0.4.8 py_0 anaconda
pyasn1-modules 0.2.7 py_0 anaconda
pyautogui 0.9.48 py37_0 conda-forge
pycodestyle 2.6.0 py_0
pycparser 2.20 py_0
pydocstyle 4.0.1 py_0
pyflakes 2.2.0 py_0
pygame 1.9.6 pypi_0 pypi
pyglet 1.5.0 pypi_0 pypi
pygments 2.6.1 py_0
pyjwt 1.7.1 py37_0 anaconda
pylint 2.5.2 py37_0
pymsgbox 1.0.7 py_0 conda-forge
pynacl 1.3.0 py37h62dcd97_0
pyopenssl 19.1.0 py37_0
pyparsing 2.4.7 py_0
pyqt 5.12.3 py37h1834ac0_3 conda-forge
pyqt5-sip 4.19.18 pypi_0 pypi
pyqtchart 5.12 pypi_0 pypi
pyqtwebengine 5.12.1 pypi_0 pypi
pyrsistent 0.16.0 py37he774522_0
pyscreeze 0.1.26 py_0 conda-forge
pysocks 1.7.1 py37_0
python 3.7.7 h81c818b_4
python-dateutil 2.8.1 py_0
python-jsonrpc-server 0.3.4 py_0
python-language-server 0.31.9 py37_0
python_abi 3.7 1_cp37m conda-forge
pytweening 1.0.3 py_0 conda-forge
pytz 2020.1 py_0
pywin32 227 py37he774522_1
pywin32-ctypes 0.2.0 py37_1000
pyyaml 5.3.1 py37he774522_0
pyzmq 18.1.1 py37ha925a31_0
qdarkstyle 2.8.1 py_0
qt 5.12.5 h7ef1ec2_0 conda-forge
qtawesome 0.7.0 py_0
qtconsole 4.7.4 py_0
qtpy 1.9.0 py_0
r-assertthat 0.2.1 r36h6115d3f_0 r
r-base 3.6.1 hf18239d_1 r
r-cli 1.1.0 r36h6115d3f_0 r
r-colorspace 1.4_1 r36h6115d3f_0 r
r-crayon 1.3.4 r36h6115d3f_0 r
r-dichromat 2.0_0 r36h6115d3f_4 r
r-digest 0.6.18 r36h6115d3f_0 r
r-fansi 0.4.0 r36h6115d3f_0 r
r-ggplot2 3.1.1 r36h6115d3f_0 r
r-glue 1.3.1 r36h6115d3f_0 r
r-gtable 0.3.0 r36h6115d3f_0 r
r-labeling 0.3 r36h6115d3f_4 r
r-lattice 0.20_38 r36h6115d3f_0 r
r-lazyeval 0.2.2 r36h6115d3f_0 r
r-magrittr 1.5 r36h6115d3f_4 r
r-mass 7.3_51.3 r36h6115d3f_0 r
r-matrix 1.2_17 r36h6115d3f_0 r
r-mgcv 1.8_28 r36h6115d3f_0 r
r-munsell 0.5.0 r36h6115d3f_0 r
r-nlme 3.1_139 r36h6115d3f_0 r
r-pillar 1.3.1 r36h6115d3f_0 r
r-pkgconfig 2.0.2 r36h6115d3f_0 r
r-plyr 1.8.4 r36h6115d3f_0 r
r-proc 1.14.0 r36h6115d3f_0 r
r-r6 2.4.0 r36h6115d3f_0 r
r-rcolorbrewer 1.1_2 r36h6115d3f_0 r
r-rcpp 1.0.1 r36h6115d3f_0 r
r-reshape2 1.4.3 r36h6115d3f_0 r
r-rlang 0.3.4 r36h6115d3f_0 r
r-scales 1.0.0 r36h6115d3f_0 r
r-stringi 1.4.3 r36h6115d3f_0 r
r-stringr 1.4.0 r36h6115d3f_0 r
r-tibble 2.1.1 r36h6115d3f_0 r
r-utf8 1.1.4 r36h6115d3f_0 r
r-viridislite 0.3.0 r36h6115d3f_0 r
r-withr 2.1.2 r36h6115d3f_0 r
requests 2.23.0 py37_0
requests-oauthlib 1.3.0 py_0 anaconda
rope 0.17.0 py_0
rsa 4.0 py_0 anaconda
rtree 0.9.4 py37h21ff451_1
scikit-learn 0.22.1 py37h6288b17_0 anaconda
scipy 1.4.1 py37h9439919_0
seaborn 0.10.1 py_0 anaconda
setuptools 46.4.0 py37_0
six 1.14.0 py37_0
snowballstemmer 2.0.0 py_0
sortedcontainers 2.1.0 py37_0
sphinx 3.0.3 py_0
sphinxcontrib-applehelp 1.0.2 py_0
sphinxcontrib-devhelp 1.0.2 py_0
sphinxcontrib-htmlhelp 1.0.3 py_0
sphinxcontrib-jsmath 1.0.1 py_0
sphinxcontrib-qthelp 1.0.3 py_0
sphinxcontrib-serializinghtml 1.1.4 py_0
spyder 4.1.3 py37_0
spyder-kernels 1.9.1 py37_0
sqlite 3.31.1 h2a8f88b_1
tbb 2020.0 h74a9793_0
tensorboard 2.2.1 pyh532a8cf_0 anaconda
tensorboard-plugin-wit 1.6.0 py_0 anaconda
tensorflow 2.1.0 gpu_py37h7db9008_0 anaconda
tensorflow-base 2.1.0 gpu_py37h55f5790_0 anaconda
tensorflow-estimator 2.1.0 pyhd54b08b_0 anaconda
tensorflow-gpu 2.1.0 h0d30ee6_0 anaconda
termcolor 1.1.0 py37_1 anaconda
testpath 0.4.4 py_0
tk 8.6.8 hfa6e2cd_0
toml 0.10.0 py37h28b3542_0
tornado 6.0.4 py37he774522_1
traitlets 4.3.3 py37_0
typed-ast 1.4.1 py37he774522_0
ujson 1.35 py37hfa6e2cd_0
urllib3 1.25.8 py37_0
vc 14.1 h0510ff6_4
vs2015_runtime 14.16.27012 hf0eaf9b_2
watchdog 0.10.2 py37_0
wcwidth 0.1.9 py_0
webencodings 0.5.1 py37_1
werkzeug 0.16.1 py_0 anaconda
wheel 0.34.2 py37_0
win_inet_pton 1.1.0 py37_0
wincertstore 0.2 py37_0
wrapt 1.11.2 py37he774522_0
xlrd 1.2.0 py37_0 anaconda
xlwt 1.3.0 py37_0 anaconda
xz 5.2.5 h62dcd97_0
yaml 0.1.7 vc14h4cb57cf_1 [vc14] anaconda
yapf 0.28.0 py_0
zeromq 4.3.1 h33f27b4_3
zipp 3.1.0 py_0
zlib 1.2.11 vc14h1cdd9ab_1 [vc14] anaconda
zstd 1.3.7 h508b16e_0

@humezawa
Copy link
Author

humezawa commented Jun 1, 2020

someone please help me

@humezawa humezawa closed this as completed Jun 1, 2020
@humezawa
Copy link
Author

humezawa commented Jun 1, 2020

a

@humezawa humezawa reopened this Jun 1, 2020
@gmarkall
Copy link
Member

gmarkall commented Jun 1, 2020

Why do you do:

os.environ["CUDA_VISIBLE_DEVICES"]="-1"

?

Does it work if you remove that line?

@gmarkall gmarkall added the question Notes an issue as a question label Jun 1, 2020
@github-actions
Copy link

This issue is marked as stale as it has had no activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with any updates and confirm that this issue still needs to be addressed.

@github-actions github-actions bot added the stale Marker label for stale issues. label May 30, 2021
@esc esc removed the stale Marker label for stale issues. label May 31, 2021
@esc
Copy link
Member

esc commented May 31, 2021

@humezawa we never hear back from you, is this issue still present for you?

@gmarkall
Copy link
Member

gmarkall commented Jun 1, 2021

Closing this as the issue appears to be explained - please reopen it if the problem persists when CUDA_VISIBLE_DEVICES is not set.

@gmarkall gmarkall closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Notes an issue as a question
Projects
None yet
Development

No branches or pull requests

3 participants