cudaErrorInvalidDevice: invalid device ordinal #13445
Unanswered
rshahrabani
asked this question in
Help: Installation
Replies: 2 comments
-
We started to get this same error after a restart today Spacy 3.7.4
Cuda itself seems to be working just fine, the following code can be used to test:
The console output:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I have figured out why I myself was getting this error, I was running this behind a Flask application, by default Flask uses threading and it seems that even https://spacy.io/api/language#pipe is not thread-safe, so |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have the following environment:
spaCy version 3.7.4
Location C:\Program Files\Python\Lib\site-packages\spacy
Platform Windows-2022Server-10.0.20348-SP0
Python version 3.12.3
Pipelines en_core_web_lg (3.7.1), en_core_web_md (3.7.1), en_core_web_sm (3.7.1), en_core_web_trf (3.7.3)
We've installed CUDA v12.4 and the GPU is set up as follows:
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.78 Driver Version: 551.78 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 Tesla T4 TCC | 00000001:00:00.0 Off | 0 |
| N/A 35C P8 13W / 70W | 9MiB / 15360MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
We get the error "cudaErrorInvalidDevice: invalid device ordinal' back from spaCy when executing the following line of code:
doc = nlp(text)
We have set spaCy to use the gpu:
spacy.prefer_gpu()
Any ideas as to why this error is occurring and how we can resolve it?
Apologies if this was posted in the wrong forum.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions