-
Notifications
You must be signed in to change notification settings - Fork 282
Enable Catch2 tests in Thrust #2669
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
Conversation
|
I hit a road block with this one: The C2H library depends on Catch2, CUDA, and Thrust (with CUDA system). I cannot make the Thrust tests depend on C2H, because (despite being a circular dependency) when compiling Thrust tests for a non-CUDA system, cmake now needs to configure and build Thrust for two different systems for the same test executable. I see two possibilities:
|
40767f9 to
7facb25
Compare
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
| // clang-format off | ||
| constexpr size_t standard_test_sizes[] = | ||
| { | ||
| 0, 1, 2, 3, 4, 5, 8, 10, 13, 16, 17, 19, 27, 30, 31, 32, | ||
| 33, 35, 42, 53, 58, 63, 64, 65, 72, 97, 100, 127, 128, 129, 142, 183, 192, 201, 240, 255, 256, | ||
| 257, 302, 511, 512, 513, 687, 900, 1023, 1024, 1025, 1565, 1786, 1973, 2047, 2048, 2049, 3050, 4095, 4096, | ||
| 4097, 5030, 7791, 10000, 10027, 12345, 16384, 17354, 26255, 32768, 43718, 65533, 65536, | ||
| 65539, 123456, 131072, 731588, 1048575, 1048576, | ||
| 3398570, 9760840, (1 << 24) - 1, (1 << 24), | ||
| (1 << 24) + 1, (1 << 25) - 1, (1 << 25), (1 << 25) + 1, (1 << 26) - 1, 1 << 26, | ||
| (1 << 26) + 1, (1 << 27) - 1, (1 << 27) | ||
| }; | ||
| // clang-format on | ||
|
|
||
| constexpr size_t tiny_threshold = 1 << 5; // 32 | ||
| constexpr size_t small_threshold = 1 << 8; // 256 | ||
| constexpr size_t medium_threshold = 1 << 12; // 4K | ||
| constexpr size_t default_threshold = 1 << 16; // 64K | ||
| constexpr size_t large_threshold = 1 << 20; // 1M | ||
| constexpr size_t huge_threshold = 1 << 24; // 16M | ||
| constexpr size_t epic_threshold = 1 << 26; // 64M | ||
| constexpr size_t max_threshold = (std::numeric_limits<size_t>::max)(); | ||
|
|
||
| inline std::vector<size_t> test_sizes = [] { | ||
| std::vector<size_t> v; | ||
| for (size_t s : standard_test_sizes) | ||
| { | ||
| if (s <= default_threshold) | ||
| { | ||
| v.push_back(s); | ||
| } | ||
| } | ||
| return v; | ||
| }(); | ||
|
|
||
| inline std::vector<size_t> get_test_sizes() | ||
| { | ||
| return test_sizes; | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expose this, so Catch2 tests can use get_test_sizes()
|
I think in the medium term we can think about redefining |
🟨 CI finished in 5h 25m: Pass: 94%/138 | Total: 2d 20h | Avg: 29m 40s | Max: 1h 27m | Hits: 77%/148257
|
| 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: 138)
| # | Runner |
|---|---|
| 95 | linux-amd64-cpu16 |
| 12 | linux-amd64-gpu-rtxa6000-latest-1 |
| 11 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 4 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
a859fa9 to
ab24c7d
Compare
🟩 CI finished in 1h 56m: Pass: 100%/138 | Total: 1d 22h | Avg: 20m 03s | Max: 1h 23m | Hits: 86%/161628
|
| 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: 138)
| # | Runner |
|---|---|
| 95 | linux-amd64-cpu16 |
| 12 | linux-amd64-gpu-rtxa6000-latest-1 |
| 11 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 4 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
ab24c7d to
aec0fda
Compare
🟩 CI finished in 2h 11m: Pass: 100%/138 | Total: 2d 00h | Avg: 20m 52s | Max: 1h 30m | Hits: 84%/161576
|
| 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: 138)
| # | Runner |
|---|---|
| 95 | linux-amd64-cpu16 |
| 12 | linux-amd64-gpu-rtxa6000-latest-1 |
| 11 | windows-amd64-cpu16 |
| 10 | linux-arm64-cpu16 |
| 4 | linux-amd64-gpu-h100-latest-1 |
| 3 | linux-amd64-gpu-rtx2080-latest-1 |
| 3 | linux-amd64-gpu-rtx4090-latest-1 |
This PR allows Thrust tests to be written with Catch2 as well, similarly to CUB. Catch2 source files need to be prefixes with
catch2_test.This PR does not allow C2H to be used in Thrust tests, see below.
The
alignmentandbinary_searchtests have been ported as examples.Fixes: #2667