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: CUDA error: invalid device ordinal #4

Open
OneStepAndTwoSteps opened this issue Apr 19, 2023 · 1 comment
Open

RuntimeError: CUDA error: invalid device ordinal #4

OneStepAndTwoSteps opened this issue Apr 19, 2023 · 1 comment

Comments

@OneStepAndTwoSteps
Copy link

作者你好,我在colab上运行项目的时候出现了这样的问题,看代码中的cuda指定的是0也没有指定多个GPU。我不知道是什么原因导致的这个问题。
RuntimeError: CUDA error: invalid device ordinal
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be
incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

@zbisure
Copy link

zbisure commented Apr 19, 2023

demo.py文件的
AutoModel.from_pretrained(gen_model_name_or_path, trust_remote_code=True).half().cuda(1)
cuda(1)改为cuda(0)

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