NVIDIA / vid2vid

Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.
Other
8.6k stars 1.2k forks source link

torch.FatalError: cuda runtime error (8) : invalid device function at Resample2d_kernel.cu:205 #12

Closed switchhh closed 6 years ago

switchhh commented 6 years ago

I have met this problem and have no idea deal with it...

THCudaCheck FAIL file=Resample2d_kernel.cu line=205 error=8 : invalid device function
Traceback (most recent call last):
  File "test.py", line 43, in <module>
    generated = model.inference(A, B, inst)
  File "/mnt/yry/vid2vid-master/models/vid2vid_model_G.py", line 198, in inference
    fake_B = self.generate_frame_infer(real_A[self.n_scales-1-s], s)
  File "/mnt/yry/vid2vid-master/models/vid2vid_model_G.py", line 216, in generate_frame_infer
    self.fake_B_feat, self.flow_feat, self.fake_B_fg_feat, use_raw_only)    
  File "/mnt/yry/vid2vid-master/models/networks.py", line 177, in forward
    img_warp = self.resample(img_prev[:,-3:,...].cuda(gpu_id), flow).cuda(gpu_id)        
  File "/home/liuzhiqing/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in __call__
    result = self.forward(*input, **kwargs)
  File "/mnt/yry/vid2vid-master/models/flownet2_pytorch/networks/resample2d_package/modules/resample2d.py", line 14, in forward
    return Resample2dFunction.apply(input1_c, input2, self.kernel_size)
  File "/mnt/yry/vid2vid-master/models/flownet2_pytorch/networks/resample2d_package/functions/resample2d.py", line 19, in forward
    resample2d.Resample2d_cuda_forward(input1, input2, output, kernel_size)
  File "/home/liuzhiqing/anaconda3/envs/pytorch/lib/python3.6/site-packages/torch/utils/ffi/__init__.py", line 197, in safe_call
    result = torch._C._safe_call(*args, **kwargs)
torch.FatalError: cuda runtime error (8) : invalid device function at Resample2d_kernel.cu:205

Can anybody fix it?

tcwang0509 commented 6 years ago

Can you first try if you can run flownet2: https://github.com/NVIDIA/flownet2-pytorch ?

Justobe commented 5 years ago

@switchhh Did u fix it? I met the same probem but I don't know how to fix it. Thank u in advance.