Repository navigation
[STF] Add support for codes which do not allow exceptions - #4373
Merged
Merged
Conversation
Contributor
Contributor
Author
|
/ok to test |
miscco
reviewed
Apr 8, 2025
| { | ||
| return ::std::forward<L>(e.lhs); | ||
| } | ||
| # ifndef _CCCL_NO_EXCEPTIONS |
Contributor
There was a problem hiding this comment.
I would prefer a __throw_cudastf_failure or whatever name fits
Contributor
Author
There was a problem hiding this comment.
the "failure" exception itself is in the proper namespace, but i'm going to also add this helper to adress the case of --no-exceptions properly
| unsigned char buffer[size * sizeof(T)]; | ||
| auto& result = *reinterpret_cast<::std::array<T, size>*>(&buffer[0]); | ||
| size_t i = 0; // marks the already-constructed portion of the array | ||
| #ifndef _CCCL_NO_EXCEPTIONS |
Contributor
There was a problem hiding this comment.
This kind of code is best handled with an exception guard, see __make_exception_guard
Contributor
Author
There was a problem hiding this comment.
Since we still throw eventually i'm not sure it's applicable ?
Contributor
🟩 CI finished in 31m 49s: Pass: 100%/24 | Total: 4h 47m | Avg: 11m 58s | Max: 31m 46s | Hits: 81%/13500
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
🏃 Runner counts (total jobs: 24)
| # | Runner |
|---|---|
| 15 | linux-amd64-cpu16 |
| 4 | linux-arm64-cpu16 |
| 2 | windows-amd64-cpu16 |
| 2 | linux-amd64-gpu-rtx2080-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
caugonnet
commented
Apr 8, 2025
Contributor
Author
|
/ok to test |
Contributor
Author
|
/ok to test |
Contributor
🟨 CI finished in 14m 12s: Pass: 8%/24 | Total: 1h 17m | Avg: 3m 12s | Max: 12m 34s | Hits: 95%/564
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
🏃 Runner counts (total jobs: 24)
| # | Runner |
|---|---|
| 15 | linux-amd64-cpu16 |
| 4 | linux-arm64-cpu16 |
| 2 | windows-amd64-cpu16 |
| 2 | linux-amd64-gpu-rtx2080-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
Contributor
Author
|
/ok to test |
Contributor
🟩 CI finished in 34m 02s: Pass: 100%/24 | Total: 6h 20m | Avg: 15m 50s | Max: 32m 44s | Hits: 57%/13500
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
🏃 Runner counts (total jobs: 24)
| # | Runner |
|---|---|
| 15 | linux-amd64-cpu16 |
| 4 | linux-arm64-cpu16 |
| 2 | windows-amd64-cpu16 |
| 2 | linux-amd64-gpu-rtx2080-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
Contributor
Author
|
/ok to test |
miscco
reviewed
Apr 9, 2025
Contributor
Author
|
/ok to test |
Contributor
🟩 CI finished in 46m 24s: Pass: 100%/24 | Total: 2h 50m | Avg: 7m 07s | Max: 22m 48s | Hits: 96%/13500
|
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
Modifications in project or dependencies?
| Project | |
|---|---|
| CCCL Infrastructure | |
| libcu++ | |
| CUB | |
| Thrust | |
| +/- | CUDA Experimental |
| stdpar | |
| python | |
| CCCL C Parallel Library | |
| Catch2Helper |
🏃 Runner counts (total jobs: 24)
| # | Runner |
|---|---|
| 15 | linux-amd64-cpu16 |
| 4 | linux-arm64-cpu16 |
| 2 | windows-amd64-cpu16 |
| 2 | linux-amd64-gpu-rtx2080-latest-1 |
| 1 | linux-amd64-gpu-h100-latest-1 |
miscco
approved these changes
Apr 9, 2025
davebayer
pushed a commit
to davebayer/cccl
that referenced
this pull request
Apr 11, 2025
* Add support for codes which do not allow exceptions * use ::cuda::std::__throw_runtime_error * define __throw_stf_failure * use __make_exception_guard * fix how we use __make_exception_guard * only remove a test related to exceptions, not all the unit tests of EXPECT * Replace _CCCL_NO_EXCEPTIONS by _CCCL_HAS_EXCEPTIONS()
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
We cannot use throw, catch or try if the --no-exceptions flag is set by the user
Checklist