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

Replace <torch/extension.h> with <torch/all.h> #8

Open
tobias-kirschstein opened this issue Jul 23, 2023 · 0 comments
Open

Replace <torch/extension.h> with <torch/all.h> #8

tobias-kirschstein opened this issue Jul 23, 2023 · 0 comments

Comments

@tobias-kirschstein
Copy link

Thank you for this great implementation of distortion loss.

I ran into this issue when compiling your extension.

\lib\site-packages\torch\include\pybind11\cast.h(624): error: too few arguments for template template parameter "Tuple"
          detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(721): here

\lib\site-packages\torch\include\pybind11\cast.h(717): error: too few arguments for template template parameter "Tuple"
          detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> [with Tuple=std::pair, Ts=<T1, T2>]"
(721): here

Following a discussion in the Pytorch3D repo it seems like the issue is that nvcc doesn't like pybind under Windows.
I found out that replacing this line:


with

#include <torch/all.h> 

actually solved the problem for me.

If there is no other reason to use torch/extension.h there, I would suggest to change that line in your repo to facilitate compilation for some OS-nvcc pairs.

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