-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
error: too few arguments for template template parameter "Tuple" detected during instantiation of class "pybind11::detail::tuple_caster<Tuple, Ts...> #1024
Comments
|
Does there anyway to support this compiler? I got this issue everywhere on any windows machine. |
Just like here, there is mention of tuple_caster template template problems in the log in #920 (which I think gets caused by other errors). The solution to that involved commenting out the c++14 in setup.py and downgrading the compiler like #876 (comment) . I think you are using an even newer compiler, which may have the same problem. What is your version of Visual Studio 2019, and can you check if there are any earlier errors in the log file? |
@bottler Hi, thanks for your reply. I actually already tried comment out std++14 from setup.py. But same error still got. Downgrading compiler does there any specific version needed? this is my version: However, why not add newer compiler support since we will move to this new compiler eventually someday. |
You have 16.11.8 and a previous problem was with 16.11.5. Downgrading to 16.9.6 was what helped on the other issue. |
The problem is not specific to PyTorch3D. It is an incompatibility with certain CUDA versions (maybe just 11.2 and 11.3). It may get fixed in a future compiler update, or maybe the idea is that people should now use CUDA 11.5 or later. |
@bottler For your notice am just using CUDA 11.5. I think downgrading to 16.9.6 should be the only solution for now. Does it will break my enviroments if I downgraded visual studio version? |
Sorry I cannot be sure. I expect it won't be a problem. |
The same issue when i'm trying to build my application with pybind11 includes and CUDA support. Tried VS2017, CUDA 11.4; VS2017, CUDA 11.6; VS2022, CUDA11.6 also with Pybind 2.9.0. Probably, need to address issue for pybind11 repo. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
@mediev Sorry I missed your message. Thanks. That's interesting. So it's not unique to VS2019, and newer CUDA doesn't fix it. |
I have the same issue. I failed to compile multiple libraries. First time I thought maybe its the library issue , but this time it failed with the same message. Windows 10
|
@mrsaleh Your problem is not related to pytorch3d but I suspect its cause is similar to this issue here. Whatever library you are trying to compile has the file correlation_kernel.cu and it probably includes (perhaps indirectly) a header from pytorch (e.g. torch/extension.h) which itself includes pybind which the windows nvcc isn't happy with. (Typically these things are not a problem on linux.) The solution will be to change headers around, and this may necessitate changes to the library to use lower level apis of pytorch - see e.g. 3388d3f . We can't help! |
I use VS2022 and CUDA 11.6. And I found a solution in https://stackoverflow.com/questions/73489837/why-the-base-case-with-no-template-arguments-for-variadic-tuple-is-not-working, which was caused by MSVC 2022 changing the incantation. // Base implementation for std::tuple and std::pair template <typename T1, typename T2> template <typename... Ts> template <template <typename...> class Tuple, typename... Ts> |
To make things easier for whoever needs this, here is the updated cast.h, replacing your torch\include\pybind11\cast.h with it should work. Besides that, here is the git patch of this change, applying this patch on cast.h should also do the trick as well. tested on pytorch 1.12.1, it may or may not work for other versions |
It's not work. |
It worked! Thanks soooo much! |
The text was updated successfully, but these errors were encountered: