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

[BUG]: thrust::tuple<Eigen::Vector3f> copy Constructor fails in template dedcution #2936

Closed
1 task done
miwechner opened this issue Nov 22, 2024 · 1 comment
Closed
1 task done
Assignees
Labels
bug Something isn't working right. thrust For all items related to Thrust.

Comments

@miwechner
Copy link

miwechner commented Nov 22, 2024

Is this a duplicate?

Type of Bug

Compile-time Error

Component

Thrust

Describe the bug

Trying to call the copy constuctor on a thrust::tuple<Eigen::Vector3f> results in a compile time error. However, copy assignment strangely still works. Not sure whats so special about Eigen::Matrix types that it causes it to trigger a deduction with an iterator type. Using cuda::std::tuple instead of thrust::tuple also works.

Originally had the problem on MSVC 19.41 with CUDA 12.6 buried inside a call to thrust::sorty_by_key with a zip iterator as the Output Iterator for the values, but was also easily reproducible on godbolt.

How to Reproduce

See godbolt link

Expected behavior

thrust::tuple<Eigen::Vector3f> should be copy constructed

Reproduction link

https://godbolt.org/z/n6M7ET6jf

Operating System

No response

nvidia-smi output

No response

NVCC version

nvcc version 12.6.1

@miwechner miwechner added the bug Something isn't working right. label Nov 22, 2024
@miwechner miwechner changed the title [BUG]: thrust::tuple<Eigen::Vector3f> copy Constructor fails in template decution [BUG]: thrust::tuple<Eigen::Vector3f> copy Constructor fails in template dedcution Nov 22, 2024
@bernhardmgruber bernhardmgruber self-assigned this Nov 22, 2024
@bernhardmgruber bernhardmgruber added the thrust For all items related to Thrust. label Nov 22, 2024
@bernhardmgruber
Copy link
Contributor

Thank you for reporting this issue! We had a time earlier this year where we implemented thrust::tuple in terms of cuda::std::tuple, but had to keep a few workarounds in. This caused errors like the one you observed in other projects as well, so we eventually reverted the change.

However, replacing thrust::tuple completely by cuda::std::tuple eventually worked (only an alias remains in Thrust), and this error is gone now on the current main branch: https://godbolt.org/z/7qxcG818P (you can select CCCL trunk on compiler explorer). So I kindly ask you to either wait for the next CUDA Toolkit shipping the change, or using CCCL directly from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right. thrust For all items related to Thrust.
Projects
None yet
Development

No branches or pull requests

2 participants