Restormer icon indicating copy to clipboard operation
Restormer copied to clipboard

Seem that the version of pytorch dismatch with the gpu

Open YngMgC opened this issue 2 months ago • 3 comments

I run the code on an nvidia gpu A6000, I met the following error:

Traceback (most recent call last): File "demo.py", line 127, in input_ = F.pad(input_, (0,padw,0,padh), 'reflect') File "/hdd2/zhangzhilu/cmy/cmy-env/restormer/lib/python3.7/site-packages/torch/nn/functional.py", line 4017, in _pad return torch._C._nn.reflection_pad2d(input, pad) RuntimeError: CUDA error: no kernel image is available for execution on the device

it seems that the version of torch is too old; if I update the torch version to 2.0.1 with cuda11.8 in the environment , it would failed when I build the basicsr through the following command:

python setup.py develop --no_cuda_ext

the failed reason: ModuleNotFoundError: No module named 'torch'

So when i keep 10.2, CUDA error: no kernel image is available for execution on the device;when i update to 11.8, i can't build the environment.Have you encounter problem like this ? Is the error owing to the old version of torch?

YngMgC avatar Oct 19 '25 12:10 YngMgC

Perhaps you can keep the PyTorch version unchanged while upgrading the CUDA version conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=11.3 -c pytorch -c conda-forge

Lathezero avatar Nov 25 '25 01:11 Lathezero

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

Mytttttttt avatar Nov 25 '25 01:11 Mytttttttt

got it, thank u

YngMgC avatar Dec 08 '25 08:12 YngMgC