Repository navigation
[Backport branch/3.2.x] Ensure that we properly warn about device lambdas that need to query the return type - #6782
Merged
Conversation
…the return type (#6765) * Ensure that we properly check if a device lambda is wrapped We were checking `__nv_is_extended_device_lambda_closure_type(_Fp)` and so on, but that does not work if the device lambda is cvref-qualified Fix this by checking `remove_cvref_t` Fixes #6762 * Ensure that `thrust::transform_iterator` properly checks for device lambdas Fixes [BUG]: `thrust::transform_iterator` no longer emits diagnostic when used with __device__ lambda Fixes #6763 (cherry picked from commit 8588acb)
Contributor
Contributor
|
/ok to test 457f0c9 |
This comment has been minimized.
This comment has been minimized.
fbusato
approved these changes
Nov 25, 2025
bernhardmgruber
approved these changes
Nov 25, 2025
bernhardmgruber
enabled auto-merge (squash)
November 25, 2025 18:43
This comment has been minimized.
This comment has been minimized.
Contributor
|
/ok to test dd16725 |
Contributor
Author
🥳 CI Workflow Results🟩 Finished in 1h 08m: Pass: 100%/131 | Total: 18h 29m | Max: 1h 03m | Hits: 99%/307809See results here. |
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 26, 2026
… about device lambdas that need to query the return type (NVIDIA/cccl#6765) (NVIDIA/cccl#6782) Upstream: NVIDIA/cccl@2f529ed HIP counterpart (system/hip): none. transform_iterator_reference now uses _THRUST_STD::invoke_result_t<UnaryFunc&, ...> (also for functional::actor) so the device-lambda return-type diagnostic fires; kept local include block (type_traits umbrella provides invoke_result_t; upstream's granular __functional/__type_traits includes not added). libcudacxx invoke.h part not applicable. test/ counterpart: none. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
amd-jmahovsky
added a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 28, 2026
…ludes Related upstream commit: 2f529edf653 Ensure that we properly warn about device lambdas that need to query the return type (#6765) (NVIDIA/cccl#6782) Related local port commit: 99ecdb9 The port kept the local include block (type_traits umbrella plus !_THRUST_HAS_DEVICE_SYSTEM_STD fallbacks) instead of upstream's granular includes. libhipcxx is now mandatory, so transform_iterator.h now: - includes the upstream __functional/{identity,invoke}.h, __memory/construct_at.h and __type_traits/{is_copy_assignable, is_copy_constructible,remove_cvref,remove_reference}.h headers, dropping the dead fallback includes and the libcxx_wrapper construct_at.h; - spells ::internal::remove_cvref / __destroy_at / __construct_at as _THRUST_STD:: like upstream's ::cuda::std::. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
… about device lambdas that need to query the return type (NVIDIA/cccl#6765) (NVIDIA/cccl#6782) Upstream: NVIDIA/cccl@2f529ed HIP counterpart (system/hip): none. transform_iterator_reference now uses _THRUST_STD::invoke_result_t<UnaryFunc&, ...> (also for functional::actor) so the device-lambda return-type diagnostic fires; kept local include block (type_traits umbrella provides invoke_result_t; upstream's granular __functional/__type_traits includes not added). libcudacxx invoke.h part not applicable. test/ counterpart: none. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
… about device lambdas that need to query the return type (NVIDIA/cccl#6765) (NVIDIA/cccl#6782) Upstream: NVIDIA/cccl@2f529ed HIP counterpart (system/hip): none. transform_iterator_reference now uses _THRUST_STD::invoke_result_t<UnaryFunc&, ...> (also for functional::actor) so the device-lambda return-type diagnostic fires; kept local include block (type_traits umbrella provides invoke_result_t; upstream's granular __functional/__type_traits includes not added). libcudacxx invoke.h part not applicable. test/ counterpart: none. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 29, 2026
…ludes Related upstream commit: 2f529edf653 Ensure that we properly warn about device lambdas that need to query the return type (#6765) (NVIDIA/cccl#6782) Related local port commit: 99ecdb9 The port kept the local include block (type_traits umbrella plus !_THRUST_HAS_DEVICE_SYSTEM_STD fallbacks) instead of upstream's granular includes. libhipcxx is now mandatory, so transform_iterator.h now: - includes the upstream __functional/{identity,invoke}.h, __memory/construct_at.h and __type_traits/{is_copy_assignable, is_copy_constructible,remove_cvref,remove_reference}.h headers, dropping the dead fallback includes and the libcxx_wrapper construct_at.h; - spells ::internal::remove_cvref / __destroy_at / __construct_at as _THRUST_STD:: like upstream's ::cuda::std::. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Naraenda
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
… about device lambdas that need to query the return type (NVIDIA/cccl#6765) (NVIDIA/cccl#6782) Upstream: NVIDIA/cccl@2f529ed HIP counterpart (system/hip): none. transform_iterator_reference now uses _THRUST_STD::invoke_result_t<UnaryFunc&, ...> (also for functional::actor) so the device-lambda return-type diagnostic fires; kept local include block (type_traits umbrella provides invoke_result_t; upstream's granular __functional/__type_traits includes not added). libcudacxx invoke.h part not applicable. test/ counterpart: none. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
Beanavil
pushed a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
… about device lambdas that need to query the return type (NVIDIA/cccl#6765) (NVIDIA/cccl#6782) Upstream: NVIDIA/cccl@2f529ed HIP counterpart (system/hip): none. transform_iterator_reference now uses _THRUST_STD::invoke_result_t<UnaryFunc&, ...> (also for functional::actor) so the device-lambda return-type diagnostic fires; kept local include block (type_traits umbrella provides invoke_result_t; upstream's granular __functional/__type_traits includes not added). libcudacxx invoke.h part not applicable. test/ counterpart: none. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
amd-jmahovsky
added a commit
to ROCm/rocm-libraries
that referenced
this pull request
Oct 30, 2026
…ludes Related upstream commit: 2f529edf653 Ensure that we properly warn about device lambdas that need to query the return type (#6765) (NVIDIA/cccl#6782) Related local port commit: 99ecdb9 The port kept the local include block (type_traits umbrella plus !_THRUST_HAS_DEVICE_SYSTEM_STD fallbacks) instead of upstream's granular includes. libhipcxx is now mandatory, so transform_iterator.h now: - includes the upstream __functional/{identity,invoke}.h, __memory/construct_at.h and __type_traits/{is_copy_assignable, is_copy_constructible,remove_cvref,remove_reference}.h headers, dropping the dead fallback includes and the libcxx_wrapper construct_at.h; - spells ::internal::remove_cvref / __destroy_at / __construct_at as _THRUST_STD:: like upstream's ::cuda::std::. Not compiled, tests not run (per human) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backport of #6765 to
branch/3.2.x.