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

Compile error on "gridsample_grad2" #6

Open
Burningdust21 opened this issue Jun 26, 2023 · 2 comments
Open

Compile error on "gridsample_grad2" #6

Burningdust21 opened this issue Jun 26, 2023 · 2 comments

Comments

@Burningdust21
Copy link

Hi, thanks for your great work! I try to run the code on a linux server and came across compile error when compiling the CUDA source. The complete error log can be found here, some critical errors are:

/root/.cache/torch_extensions/gridsample_grad2/f6f3395827c77b6f68bed38af0c94ab3-tesla-v100-sxm2-32gb/gridsample_cuda.cu(560): error: too many arguments in function call

/root/.cache/torch_extensions/gridsample_grad2/f6f3395827c77b6f68bed38af0c94ab3-tesla-v100-sxm2-32gb/gridsample_cuda.cu(189): error: no instance of function template "at::native::safe_add_2d" matches the argument list
            argument types are: (double *, int, int, int, int, int, int, double, int, const int)
          detected during instantiation of "void at::native::<unnamed>::grid_sampler_2d_grad2_kernel(index_t, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::native::detail::GridSamplerPadding, __nv_bool, index_t) [with scalar_t=double, index_t=int]" 
(560): here

/root/.cache/torch_extensions/gridsample_grad2/f6f3395827c77b6f68bed38af0c94ab3-tesla-v100-sxm2-32gb/gridsample_cuda.cu(474): error: no instance of function template "at::native::safe_add_3d" matches the argument list
            argument types are: (double *, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, int64_t, double, int64_t, const int64_t)
          detected during instantiation of "void at::native::<unnamed>::grid_sampler_3d_grad2_kernel(index_t, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::cuda::detail::TensorInfo<scalar_t, index_t>, at::native::detail::GridSamplerPadding, __nv_bool, index_t) [with scalar_t=double, index_t=int64_t]" 
(627): here

It seems the complier cannot found the correct function definition of safe_add_2d, safe_add_3d and AT_DISPATCH_FLOATING_TYPES_AND_HALF.

My environment is torch 1.8.0 with CUDA 11.1, Ubuntu 20.04.

Do you have any idea what maybe the problem? Thanks!

@cChrister
Copy link

I have the same problem as you, do you fix it?

@StardustLu
Copy link

It seems to be the CUDA version.
I came across the same problem when compiling it with CUDA 11.1.
Then I downgrade to 11.0 or upgrade to 11.3. It works.

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