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

CUDA error: no kernel image is available for execution on the device #77

Open
Sitiange opened this issue Feb 24, 2024 · 1 comment
Open

Comments

@Sitiange
Copy link

I have configured the environment as required, but I still get a CUDA error when running pretrain.py, why?

Environment:
python 3.6
torch 1.6.0+cu101
dgl-cu101 0.4.3
CUDA 10.1
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

Traceback (most recent call last):
File "pretrain.py", line 139, in
train(args)
File "pretrain.py", line 51, in train
model.cuda()
File "/home/sitiange/miniconda3/envs/renet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 458, in cuda
return self._apply(lambda t: t.cuda(device))
File "/home/sitiange/miniconda3/envs/renet/lib/python3.6/site-packages/torch/nn/modules/module.py", line 354, in _apply
module._apply(fn)
File "/home/sitiange/miniconda3/envs/renet/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 161, in _apply
self.flatten_parameters()
File "/home/sitiange/miniconda3/envs/renet/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 151, in flatten_parameters
self.batch_first, bool(self.bidirectional))
RuntimeError: CUDA error: no kernel image is available for execution on the device

@Sitiange
Copy link
Author

I find the reason, NVIDIA A40 with CUDA capability sm_86 is not compatible with PyTorch 1.6...

@Sitiange Sitiange reopened this Feb 24, 2024
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

1 participant