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

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

Closed
switchhh opened this issue Aug 23, 2018 · 2 comments

Comments

@switchhh
Copy link

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
Copy link
Contributor

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

@Justobe
Copy link

Justobe commented Dec 14, 2018

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

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

3 participants