-
Notifications
You must be signed in to change notification settings - Fork 318
Fix/modernize thrust examples #7094
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
base: main
Are you sure you want to change the base?
Conversation
|
/ok to test e89e7c2 |
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com>
Co-authored-by: Michael Schellenberger Costa <miscco@nvidia.com>
|
/ok to test a104277 |
|
pre-commit.ci autofix |
|
From the CI: Please add a new file target_compile_options(
${example_target}
PRIVATE $<$<COMPILE_LANG_AND_ID:CUDA,NVIDIA>: --extended-lambda>
) |
@Flawxd I wonder how you verfied this, because the example in the PR cannot be compiled without |
Yes, I did test it using --extend-lambda, it was an oversight from me to not include it in a cmake file, I'll push the new file |
|
pre-commit.ci autofix |
|
/ok to test 3f87a1d |
This comment has been minimized.
This comment has been minimized.
|
Please also add this to the cmake file: we already have this fix in other places. |
|
Hello, isnt the correct variable example_target instead of test_target ? |
Correct. I copied this from a test.
Yes, but this may be trickier than it sounds. |
|
Alright then, I'll do what you suggested with the correct variable |
|
/ok to test 3fd0ed9 |
This comment has been minimized.
This comment has been minimized.
|
/ok to test e92d109 |
😬 CI Workflow Results🟥 Finished in 2h 24m: Pass: 80%/51 | Total: 22h 43m | Max: 2h 23m | Hits: 91%/96087See results here. |
Following #724
Modernizes the thrust/examples/word_count.cu example by replacing the functor struct is_word_start with an extended lambda
to align with modern C++ practices and to make it easier to read
Changes:
Replaced struct is_word_start with a host device lambda.
Replaced C-style array pointer arithmetic with std::begin() and std::end() for safer iterator access.
The code was verified using a T4 GPU and ran perfectly