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

RuntimeError: Invalid device, must be cuda device #3

Closed
bott1eee opened this issue Nov 5, 2021 · 2 comments
Closed

RuntimeError: Invalid device, must be cuda device #3

bott1eee opened this issue Nov 5, 2021 · 2 comments

Comments

@bott1eee
Copy link

bott1eee commented Nov 5, 2021

Traceback (most recent call last):
File "FPT/ubuntu_final.py", line 532, in
main()
File "FPT/ubuntu_final.py", line 465, in main
input_ids, input_mask, segment_ids,lm_label_ids, is_next = batch
File "FPT/ubuntu_final.py", line 464, in
batch = (item.cuda(device=device) for item in batch)
RuntimeError: Invalid device, must be cuda device

Hello! When I run the project in torch1.7.0/cuda 10.1 environment, I get the above error. But I can only run it in the above environment at the moment, do I need to make any changes? Thanks!

@hanjanghoon
Copy link
Owner

hanjanghoon commented Nov 7, 2021 via email

@bott1eee
Copy link
Author

bott1eee commented Nov 7, 2021

Yes, it may need to be changed. I'm sorry, but unfortunately, I don't have time right now, so I think I'll be able to do this later. It seems like you need to change the device allocation part. Thank you!

-- JangHoon Han AI Research Engineer | Professional Language Lab | LG AI Research, Seoul, Korea Mobile : (+82)10-8591-1081 lgresearch.ai
-----Original Message----- From: @.> To: @.>; Cc: @.***>; Sent: 2021-11-05 (금) 12:13:45 (GMT+09:00) Subject: [hanjanghoon/BERT_FP] RuntimeError: Invalid device, must be cuda device (Issue #3) Traceback (most recent call last): File "FPT/ubuntu_final.py", line 532, in main() File "FPT/ubuntu_final.py", line 465, in main input_ids, input_mask, segment_ids,lm_label_ids, is_next = batch File "FPT/ubuntu_final.py", line 464, in batch = (item.cuda(device=device) for item in batch) RuntimeError: Invalid device, must be cuda device Hello! When I run the project in torch1.7.0/cuda 10.1 environment, I get the above error. But I can only run it in the above environment at the moment, do I need to make any changes? Thanks! — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

well,thanks for you answer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants