-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[COREF] en_coreference_web_trf(3.4.0a2)
breaks by storing some tensors on CPU and some on GPU
#13023
Comments
en_coreference_web_trf(3.4.0a2)
breaks by storing input on GPU and parameters on CPU en_coreference_web_trf(3.4.0a2)
breaks by storing some tensors on CPU and some on GPU
Do you have the latest version of |
Thanks! But will Anyways, I will try updating to |
Okay, it works! I updated successfully to Thanks a lot! |
interesting. encountering the same error. will try spacy experimental as well :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Problem as in the title. Code that is perfectly fine when
spacy
runs on CPU breaks when GPU acceleration is turned on.This happens at least for the model en_coreference_web_trf-3.4.0a2.
How to reproduce the behaviour
So clearly the component does its job when running on CPU. But run this with
spacy.prefer_gpu()
and everything breaks:It seems that some tensors are stored on GPU and some still on CPU. Apparently this inconsistency may appear in several different parts of the code but for sure for the above reprex it is happening around line 269 of
pytorch_coref_model.py
where an attempt at performing an operation using tensorsword_ids
(stored on CPU) andtop_indices
(stored on GPU) is made.Your Environment
The text was updated successfully, but these errors were encountered: