Skip to content

[CUDAX] Refactor arch traits to be more structured and support arch-specific targets - #5064

Merged
pciolkosz merged 10 commits into
NVIDIA:mainfrom
pciolkosz:arch_traits_use_types
Jul 16, 2025
Merged

pciolkosz merged 10 commits into
NVIDIA:mainfrom
pciolkosz:arch_traits_use_types

Conversation

@pciolkosz

@pciolkosz pciolkosz commented Jun 25, 2025 •

Copy link
Copy Markdown
Contributor

There is a bit of redundancy in arch traits right now, where there is arch_traits_t and the arch template is also a bit of a traits type templated on __CUDA_ARCH__ values. We also don't have a good way to support arch-specific targets, because we are relying on compute capability values everywhere, which makes it hard to represent something like sm_90a.

This PR tries to shuffle things around and structure them better. It introduces arch namespace to avoid repeating that prefix on the names of all introduced APIs. arch namespace has two key components:

  1. id, which is an enum meant to represent all different compilation targets, including the arch-specific targets. It is named to mimic the arch argument to nvcc sm_90, sm_90a etc. We could consider some different name as well, for example compute_90 or something completely new.
  2. traits_t which is the type with all the static architecture traits like shared memory size, compute capability etc. This type is also released from device::arch_traits() API for a given device.
  3. traits function template that accepts id as a template argument. This is how you access the traits.
  4. Outside of the arch namespace there is also a concept of compute capability, which is translatable to traits with traits_for_compute_capability or id with id_for_compute_capability constexpr functions. I decided to move to major * 10 + minor format, because I don't want __CUDA_ARCH__ macro to be used with APIs accepting compute capability. Instead we offer current_traits function, which will return traits according to the current __CUDA_ARCH__. We could also provide an arch type alias for the current __CUDA_ARCH__, but because there is a host pass over device code, it could become problematic.

To sumarize:
arch::id::sm_90 is an enum value of type arch::id that represents a given architecture.
arch::traits<arch::id::sm_90>() is a constexpr function returning all traits of a given architecture.

The structure selected was designed to work well for:

  1. Get traits for a given device with:
    auto traits = device.arch_traits()
  2. Get traits for a given arch with
    auto traits = arch::traits<arch::id::sm_XY>()
  3. Get traits for the current architecture in device code with:
    auto traits = arch::current_traits()
    This should return any architecture-specific target (like sm_90a) traits if enabled.
  4. Template your code for a given architecture by accepting the architecture enum as a template argument

It allows to do other things, but might need a few steps:

  1. Store an architecture dynamically and get a traits for it later:
arch::id arch_id = arch::id::sm_90;
(...)
auto traits = arch::traits_for_id(arch_id);
  1. Get id/traits from int compute capability:
auto traits = arch::traits_for_compute_capability(cc);
auto id      = arch::id_for_compute_capability(cc);
  1. You can also get id from the traits, because arch::traits_t has an id member.

Finally this PR introduces sm_90a, sm_100a, sm_103a and sm_120a id to show how it fits into the new structure. For now we don't have any trait fields that would be different for those a architectures, but it should come in the future. There are also sm_XYf family targets that we probably need to add as well. We could also think about member aliases to link between sm_100, sm_100a and sm_100f, but that is also left for future changes.

@pciolkosz
pciolkosz requested a review from a team as a code owner June 25, 2025 21:55
@pciolkosz
pciolkosz requested a review from fbusato June 25, 2025 21:55
@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jun 25, 2025
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jun 25, 2025
@pciolkosz
pciolkosz force-pushed the arch_traits_use_types branch from faa183a to 0b38f90 Compare June 25, 2025 22:02
@github-actions

Copy link
Copy Markdown
Contributor
🟩 CI finished in 1h 01m: Pass: 100%/32 | Total: 3h 17m | Avg: 6m 10s | Max: 24m 12s | Hits: 99%/16022
  • 🟩 cudax: Pass: 100%/28 | Total: 2h 53m | Avg: 6m 11s | Max: 24m 12s | Hits: 99%/16022

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  2h 40m | Avg:  6m 40s | Max: 24m 12s | Hits:  98%/13562 
      🟩 arm64              Pass: 100%/4   | Total: 13m 19s | Avg:  3m 19s | Max:  3m 36s | Hits:  99%/2460  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 17m 52s | Avg:  5m 57s | Max: 11m 20s | Hits:  98%/1544  
      🟩 12.9               Pass: 100%/25  | Total:  2h 35m | Avg:  6m 13s | Max: 24m 12s | Hits:  99%/14478 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 17m 52s | Avg:  5m 57s | Max: 11m 20s | Hits:  98%/1544  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  2h 35m | Avg:  6m 13s | Max: 24m 12s | Hits:  99%/14478 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  2h 53m | Avg:  6m 11s | Max: 24m 12s | Hits:  99%/16022 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total:  6m 27s | Avg:  3m 13s | Max:  3m 27s | Hits:  99%/1232  
      🟩 Clang15            Pass: 100%/1   | Total:  3m 50s | Avg:  3m 50s | Max:  3m 50s | Hits:  99%/615   
      🟩 Clang16            Pass: 100%/1   | Total:  3m 45s | Avg:  3m 45s | Max:  3m 45s | Hits:  99%/615   
      🟩 Clang17            Pass: 100%/1   | Total:  3m 38s | Avg:  3m 38s | Max:  3m 38s | Hits:  99%/615   
      🟩 Clang18            Pass: 100%/1   | Total:  3m 39s | Avg:  3m 39s | Max:  3m 39s | Hits:  99%/615   
      🟩 Clang19            Pass: 100%/4   | Total: 20m 18s | Avg:  5m 04s | Max: 10m 21s | Hits:  99%/2460  
      🟩 GCC10              Pass: 100%/2   | Total:  7m 28s | Avg:  3m 44s | Max:  3m 56s | Hits:  99%/1232  
      🟩 GCC11              Pass: 100%/1   | Total:  3m 46s | Avg:  3m 46s | Max:  3m 46s | Hits:  99%/615   
      🟩 GCC12              Pass: 100%/1   | Total:  4m 24s | Avg:  4m 24s | Max:  4m 24s | Hits:  99%/615   
      🟩 GCC13              Pass: 100%/8   | Total: 56m 33s | Avg:  7m 04s | Max: 24m 12s | Hits:  99%/4920  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 11m 20s | Avg: 11m 20s | Max: 11m 20s | Hits:  95%/314   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 34m 20s | Avg: 11m 26s | Max: 12m 04s | Hits:  93%/948   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 13m 59s | Avg:  6m 59s | Max:  7m 06s | Hits:  97%/1226  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total: 41m 37s | Avg:  4m 09s | Max: 10m 21s | Hits:  99%/6152  
      🟩 GCC                Pass: 100%/12  | Total:  1h 12m | Avg:  6m 00s | Max: 24m 12s | Hits:  99%/7382  
      🟩 MSVC               Pass: 100%/4   | Total: 45m 40s | Avg: 11m 25s | Max: 12m 04s | Hits:  94%/1262  
      🟩 NVHPC              Pass: 100%/2   | Total: 13m 59s | Avg:  6m 59s | Max:  7m 06s | Hits:  97%/1226  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 13m 41s | Avg:  6m 50s | Max: 10m 18s | Hits:  99%/1230  
      🟩 rtx2080            Pass: 100%/26  | Total:  2h 39m | Avg:  6m 08s | Max: 24m 12s | Hits:  99%/14792 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  2h 08m | Avg:  5m 08s | Max: 12m 04s | Hits:  99%/14177 
      🟩 Test               Pass: 100%/3   | Total: 44m 51s | Avg: 14m 57s | Max: 24m 12s | Hits:  99%/1845  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 13m 41s | Avg:  6m 50s | Max: 10m 18s | Hits:  99%/1230  
      🟩 90;90a             Pass: 100%/2   | Total: 15m 16s | Avg:  7m 38s | Max: 11m 28s | Hits:  97%/931   
      🟩 100;120            Pass: 100%/2   | Total: 14m 28s | Avg:  7m 14s | Max: 10m 48s | Hits:  98%/931   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 13m 41s | Avg:  4m 33s | Max:  7m 06s | Hits:  98%/1843  
      🟩 20                 Pass: 100%/25  | Total:  2h 39m | Avg:  6m 23s | Max: 24m 12s | Hits:  99%/14179 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 24m 21s | Avg: 6m 05s | Max: 8m 37s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 24m 21s | Avg:  6m 05s | Max:  8m 37s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total: 11m 20s | Avg:  5m 40s | Max:  8m 37s
      🟩 12.9               Pass: 100%/2   | Total: 13m 01s | Avg:  6m 30s | Max:  8m 30s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total: 11m 20s | Avg:  5m 40s | Max:  8m 37s
      🟩 nvcc12.9           Pass: 100%/2   | Total: 13m 01s | Avg:  6m 30s | Max:  8m 30s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 24m 21s | Avg:  6m 05s | Max:  8m 37s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  8m 37s | Avg:  8m 37s | Max:  8m 37s
      🟩 Clang19            Pass: 100%/1   | Total:  8m 30s | Avg:  8m 30s | Max:  8m 30s
      🟩 GCC12              Pass: 100%/1   | Total:  2m 43s | Avg:  2m 43s | Max:  2m 43s
      🟩 GCC13              Pass: 100%/1   | Total:  4m 31s | Avg:  4m 31s | Max:  4m 31s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total: 17m 07s | Avg:  8m 33s | Max:  8m 37s
      🟩 GCC                Pass: 100%/2   | Total:  7m 14s | Avg:  3m 37s | Max:  4m 31s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 24m 21s | Avg:  6m 05s | Max:  8m 37s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 24m 21s | Avg:  6m 05s | Max:  8m 37s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

struct traits_t
{
// Maximum number of threads per block
static constexpr int max_threads_per_block = 1024;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this now a runtime value?

If we need that for python, we could turn this into a member function

[[nodiscard]] _CCCL_API static constexpr int max_threads_per_block() noexcept { return 1024; }

This would allow this to be a plain function for python and usable at compiletime with C++

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to unify things a bit. Before I had the arch_common_traits, because there were both arch_traits_t and the arch type template and both needed the common fields. Fields in arch_common_traits were inherited by the arch type template, so they needed to be static constexpr.
Now I changed the approach and the arch types have a static constexpr member of type traits_t. Because the traits variable itself is static constexpr, I believe no fields need to be static constexpr in traits_t. I probably could keep them as static, but I don't think I want users to access those traits as statics directly as traits_t::foo_trait, I want them to do sm_XY::traits.foo_trait. So I decided to unify them all to be non-static members, I believe there is no loss of functionality apart from the mentioned usage that I don't like. But its possible that I missed something, let me know if you can think of something πŸ˜„

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the size of the traits_t structure also changed and it might matter in some dynamic context, for example with device.arch_traits()? But I don't know if it matters unless traits are stored somewhere, which I don't think will be common.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not of a fan of demoting compile time constants to runtime values. We probably want to use those in a if constexpr at some point

Note that you can always do sm_XY::traits.foo_trait for static variables too

@miscco miscco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions regarding the shift towards runtime values

Comment thread cudax/test/device/arch_traits.cu Resolved
@pciolkosz
pciolkosz requested a review from a team as a code owner July 1, 2025 00:58
@github-actions

github-actions Bot commented Jul 1, 2025

Copy link
Copy Markdown
Contributor
🟩 CI finished in 19m 37s: Pass: 100%/32 | Total: 4h 00m | Avg: 7m 31s | Max: 17m 05s | Hits: 80%/16022
  • 🟩 cudax: Pass: 100%/28 | Total: 3h 47m | Avg: 8m 06s | Max: 17m 05s | Hits: 80%/16022

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  3h 22m | Avg:  8m 26s | Max: 17m 05s | Hits:  80%/13562 
      🟩 arm64              Pass: 100%/4   | Total: 24m 26s | Avg:  6m 06s | Max:  6m 59s | Hits:  80%/2460  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 24m 48s | Avg:  8m 16s | Max: 14m 19s | Hits:  76%/1544  
      🟩 12.9               Pass: 100%/25  | Total:  3h 22m | Avg:  8m 05s | Max: 17m 05s | Hits:  81%/14478 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 24m 48s | Avg:  8m 16s | Max: 14m 19s | Hits:  76%/1544  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  3h 22m | Avg:  8m 05s | Max: 17m 05s | Hits:  81%/14478 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  3h 47m | Avg:  8m 06s | Max: 17m 05s | Hits:  80%/16022 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total: 11m 02s | Avg:  5m 31s | Max:  6m 02s | Hits:  80%/1232  
      🟩 Clang15            Pass: 100%/1   | Total:  6m 06s | Avg:  6m 06s | Max:  6m 06s | Hits:  80%/615   
      🟩 Clang16            Pass: 100%/1   | Total:  6m 31s | Avg:  6m 31s | Max:  6m 31s | Hits:  80%/615   
      🟩 Clang17            Pass: 100%/1   | Total:  5m 59s | Avg:  5m 59s | Max:  5m 59s | Hits:  80%/615   
      🟩 Clang18            Pass: 100%/1   | Total:  5m 53s | Avg:  5m 53s | Max:  5m 53s | Hits:  80%/615   
      🟩 Clang19            Pass: 100%/4   | Total: 25m 52s | Avg:  6m 28s | Max:  8m 29s | Hits:  85%/2460  
      🟩 GCC10              Pass: 100%/2   | Total: 12m 08s | Avg:  6m 04s | Max:  6m 39s | Hits:  80%/1232  
      🟩 GCC11              Pass: 100%/1   | Total:  6m 37s | Avg:  6m 37s | Max:  6m 37s | Hits:  80%/615   
      🟩 GCC12              Pass: 100%/1   | Total:  6m 38s | Avg:  6m 38s | Max:  6m 38s | Hits:  80%/615   
      🟩 GCC13              Pass: 100%/8   | Total: 58m 26s | Avg:  7m 18s | Max: 11m 23s | Hits:  85%/4920  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 14m 19s | Avg: 14m 19s | Max: 14m 19s | Hits:  57%/314   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 44m 57s | Avg: 14m 59s | Max: 17m 05s | Hits:  57%/948   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 22m 34s | Avg: 11m 17s | Max: 11m 26s | Hits:  77%/1226  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total:  1h 01m | Avg:  6m 08s | Max:  8m 29s | Hits:  82%/6152  
      🟩 GCC                Pass: 100%/12  | Total:  1h 23m | Avg:  6m 59s | Max: 11m 23s | Hits:  83%/7382  
      🟩 MSVC               Pass: 100%/4   | Total: 59m 16s | Avg: 14m 49s | Max: 17m 05s | Hits:  57%/1262  
      🟩 NVHPC              Pass: 100%/2   | Total: 22m 34s | Avg: 11m 17s | Max: 11m 26s | Hits:  77%/1226  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 14m 48s | Avg:  7m 24s | Max:  9m 46s | Hits:  89%/1230  
      🟩 rtx2080            Pass: 100%/26  | Total:  3h 32m | Avg:  8m 09s | Max: 17m 05s | Hits:  79%/14792 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  3h 17m | Avg:  7m 53s | Max: 17m 05s | Hits:  78%/14177 
      🟩 Test               Pass: 100%/3   | Total: 29m 38s | Avg:  9m 52s | Max: 11m 23s | Hits:  99%/1845  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 14m 48s | Avg:  7m 24s | Max:  9m 46s | Hits:  89%/1230  
      🟩 90;90a             Pass: 100%/2   | Total: 19m 59s | Avg:  9m 59s | Max: 14m 03s | Hits:  72%/931   
      🟩 100;120            Pass: 100%/2   | Total: 19m 57s | Avg:  9m 58s | Max: 13m 49s | Hits:  72%/931   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 22m 57s | Avg:  7m 39s | Max: 11m 26s | Hits:  79%/1843  
      🟩 20                 Pass: 100%/25  | Total:  3h 24m | Avg:  8m 09s | Max: 17m 05s | Hits:  80%/14179 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 13m 51s | Avg: 3m 27s | Max: 4m 02s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 13m 51s | Avg:  3m 27s | Max:  4m 02s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  7m 03s | Avg:  3m 31s | Max:  4m 02s
      🟩 12.9               Pass: 100%/2   | Total:  6m 48s | Avg:  3m 24s | Max:  3m 27s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  7m 03s | Avg:  3m 31s | Max:  4m 02s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  6m 48s | Avg:  3m 24s | Max:  3m 27s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 13m 51s | Avg:  3m 27s | Max:  4m 02s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  3m 01s | Avg:  3m 01s | Max:  3m 01s
      🟩 Clang19            Pass: 100%/1   | Total:  3m 27s | Avg:  3m 27s | Max:  3m 27s
      🟩 GCC12              Pass: 100%/1   | Total:  4m 02s | Avg:  4m 02s | Max:  4m 02s
      🟩 GCC13              Pass: 100%/1   | Total:  3m 21s | Avg:  3m 21s | Max:  3m 21s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  6m 28s | Avg:  3m 14s | Max:  3m 27s
      🟩 GCC                Pass: 100%/2   | Total:  7m 23s | Avg:  3m 41s | Max:  4m 02s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 13m 51s | Avg:  3m 27s | Max:  4m 02s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 13m 51s | Avg:  3m 27s | Max:  4m 02s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

@github-actions

github-actions Bot commented Jul 9, 2025

Copy link
Copy Markdown
Contributor
🟩 CI finished in 19m 04s: Pass: 100%/32 | Total: 4h 08m | Avg: 7m 45s | Max: 15m 46s | Hits: 79%/16218
  • 🟩 cudax: Pass: 100%/28 | Total: 3h 54m | Avg: 8m 22s | Max: 15m 46s | Hits: 79%/16218

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  3h 29m | Avg:  8m 42s | Max: 15m 46s | Hits:  79%/13730 
      🟩 arm64              Pass: 100%/4   | Total: 25m 11s | Avg:  6m 17s | Max:  7m 14s | Hits:  79%/2488  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 26m 49s | Avg:  8m 56s | Max: 15m 46s | Hits:  74%/1565  
      🟩 12.9               Pass: 100%/25  | Total:  3h 27m | Avg:  8m 18s | Max: 15m 18s | Hits:  79%/14653 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 26m 49s | Avg:  8m 56s | Max: 15m 46s | Hits:  74%/1565  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  3h 27m | Avg:  8m 18s | Max: 15m 18s | Hits:  79%/14653 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  3h 54m | Avg:  8m 22s | Max: 15m 46s | Hits:  79%/16218 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total: 11m 08s | Avg:  5m 34s | Max:  6m 01s | Hits:  79%/1246  
      🟩 Clang15            Pass: 100%/1   | Total:  6m 28s | Avg:  6m 28s | Max:  6m 28s | Hits:  79%/622   
      🟩 Clang16            Pass: 100%/1   | Total:  6m 11s | Avg:  6m 11s | Max:  6m 11s | Hits:  79%/622   
      🟩 Clang17            Pass: 100%/1   | Total:  6m 57s | Avg:  6m 57s | Max:  6m 57s | Hits:  79%/622   
      🟩 Clang18            Pass: 100%/1   | Total:  6m 18s | Avg:  6m 18s | Max:  6m 18s | Hits:  79%/622   
      🟩 Clang19            Pass: 100%/4   | Total: 27m 01s | Avg:  6m 45s | Max:  9m 12s | Hits:  84%/2488  
      🟩 GCC10              Pass: 100%/2   | Total: 12m 35s | Avg:  6m 17s | Max:  6m 39s | Hits:  79%/1246  
      🟩 GCC11              Pass: 100%/1   | Total:  7m 00s | Avg:  7m 00s | Max:  7m 00s | Hits:  78%/622   
      🟩 GCC12              Pass: 100%/1   | Total:  7m 14s | Avg:  7m 14s | Max:  7m 14s | Hits:  78%/622   
      🟩 GCC13              Pass: 100%/8   | Total:  1h 00m | Avg:  7m 32s | Max: 10m 29s | Hits:  84%/4976  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 15m 46s | Avg: 15m 46s | Max: 15m 46s | Hits:  55%/321   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 44m 10s | Avg: 14m 43s | Max: 15m 18s | Hits:  55%/969   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 23m 15s | Avg: 11m 37s | Max: 11m 51s | Hits:  76%/1240  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total:  1h 04m | Avg:  6m 24s | Max:  9m 12s | Hits:  81%/6222  
      🟩 GCC                Pass: 100%/12  | Total:  1h 27m | Avg:  7m 15s | Max: 10m 29s | Hits:  82%/7466  
      🟩 MSVC               Pass: 100%/4   | Total: 59m 56s | Avg: 14m 59s | Max: 15m 46s | Hits:  55%/1290  
      🟩 NVHPC              Pass: 100%/2   | Total: 23m 15s | Avg: 11m 37s | Max: 11m 51s | Hits:  76%/1240  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 14m 54s | Avg:  7m 27s | Max:  9m 25s | Hits:  89%/1244  
      🟩 rtx2080            Pass: 100%/26  | Total:  3h 39m | Avg:  8m 26s | Max: 15m 46s | Hits:  78%/14974 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  3h 25m | Avg:  8m 12s | Max: 15m 46s | Hits:  76%/14352 
      🟩 Test               Pass: 100%/3   | Total: 29m 06s | Avg:  9m 42s | Max: 10m 29s | Hits:  99%/1866  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 14m 54s | Avg:  7m 27s | Max:  9m 25s | Hits:  89%/1244  
      🟩 90;90a             Pass: 100%/2   | Total: 21m 34s | Avg: 10m 47s | Max: 14m 28s | Hits:  70%/945   
      🟩 100;120            Pass: 100%/2   | Total: 21m 00s | Avg: 10m 30s | Max: 14m 24s | Hits:  70%/945   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 23m 45s | Avg:  7m 55s | Max: 11m 24s | Hits:  78%/1864  
      🟩 20                 Pass: 100%/25  | Total:  3h 30m | Avg:  8m 25s | Max: 15m 46s | Hits:  79%/14354 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 13m 39s | Avg: 3m 24s | Max: 4m 01s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 13m 39s | Avg:  3m 24s | Max:  4m 01s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  6m 17s | Avg:  3m 08s | Max:  3m 10s
      🟩 12.9               Pass: 100%/2   | Total:  7m 22s | Avg:  3m 41s | Max:  4m 01s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  6m 17s | Avg:  3m 08s | Max:  3m 10s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  7m 22s | Avg:  3m 41s | Max:  4m 01s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 13m 39s | Avg:  3m 24s | Max:  4m 01s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  3m 07s | Avg:  3m 07s | Max:  3m 07s
      🟩 Clang19            Pass: 100%/1   | Total:  3m 21s | Avg:  3m 21s | Max:  3m 21s
      🟩 GCC12              Pass: 100%/1   | Total:  3m 10s | Avg:  3m 10s | Max:  3m 10s
      🟩 GCC13              Pass: 100%/1   | Total:  4m 01s | Avg:  4m 01s | Max:  4m 01s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  6m 28s | Avg:  3m 14s | Max:  3m 21s
      🟩 GCC                Pass: 100%/2   | Total:  7m 11s | Avg:  3m 35s | Max:  4m 01s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 13m 39s | Avg:  3m 24s | Max:  4m 01s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 13m 39s | Avg:  3m 24s | Max:  4m 01s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

Comment on lines +182 to +185
// @brief Architecture type
// This type is a template that represents an architecture. It also contains the traits for that architecture.
template <id _Id>
struct type;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need a type that represents an architecture? i think it would be simpler to have a variable template of type traits_t, parameterized on the arch enum.

template <id>
extern const traits_t traits;

template <>
inline constexpr traits_t traits<id::sm_60>{
  .id                                   = id::sm_60,
  .compute_capability_major             = 6,
  .compute_capability_minor             = 0,
  .compute_capability                   = 60,
  .max_shared_memory_per_multiprocessor = 64 * 1024,
  .max_blocks_per_multiprocessor        = 32,
  .max_threads_per_multiprocessor       = 2048,
  .max_warps_per_multiprocessor         = max_threads_per_multiprocessor / warp_size,
  .reserved_shared_memory_per_block     = 0,
  .max_shared_memory_per_block_optin    = 48 * 1024,
  .cluster_supported                    = false,
  .redux_intrinisic                     = false,
  .elect_intrinsic                      = false,
  .cp_async_supported                   = false,
  .tma_supported                        = false
};

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially the main reason was that in C++17 you can't have a struct as a template argument. But I also realized that now that I added the id enum it could be used for kernel templates in C++17 instead of the type. Maybe you are right that it's no longer needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am with @ericniebler here, it would be nice to turn this into inline variables

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the variable approach I had to add _CCCL_GLOBAL_CONSTANT to it and that resulted in a bunch of device memory that needed to hold the traits, which is probably not great.
Instead I made traits a host device function that I specialize for each enum value.

@github-actions

Copy link
Copy Markdown
Contributor
🟩 CI finished in 29m 12s: Pass: 100%/32 | Total: 4h 06m | Avg: 7m 41s | Max: 15m 39s | Hits: 79%/16218
  • 🟩 cudax: Pass: 100%/28 | Total: 3h 52m | Avg: 8m 17s | Max: 15m 39s | Hits: 79%/16218

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  3h 27m | Avg:  8m 38s | Max: 15m 39s | Hits:  79%/13730 
      🟩 arm64              Pass: 100%/4   | Total: 24m 37s | Avg:  6m 09s | Max:  7m 05s | Hits:  79%/2488  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 26m 16s | Avg:  8m 45s | Max: 14m 58s | Hits:  75%/1565  
      🟩 12.9               Pass: 100%/25  | Total:  3h 25m | Avg:  8m 14s | Max: 15m 39s | Hits:  80%/14653 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 26m 16s | Avg:  8m 45s | Max: 14m 58s | Hits:  75%/1565  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  3h 25m | Avg:  8m 14s | Max: 15m 39s | Hits:  80%/14653 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  3h 52m | Avg:  8m 17s | Max: 15m 39s | Hits:  79%/16218 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total: 10m 57s | Avg:  5m 28s | Max:  6m 00s | Hits:  79%/1246  
      🟩 Clang15            Pass: 100%/1   | Total:  6m 10s | Avg:  6m 10s | Max:  6m 10s | Hits:  79%/622   
      🟩 Clang16            Pass: 100%/1   | Total:  6m 43s | Avg:  6m 43s | Max:  6m 43s | Hits:  79%/622   
      🟩 Clang17            Pass: 100%/1   | Total:  7m 04s | Avg:  7m 04s | Max:  7m 04s | Hits:  79%/622   
      🟩 Clang18            Pass: 100%/1   | Total:  6m 35s | Avg:  6m 35s | Max:  6m 35s | Hits:  79%/622   
      🟩 Clang19            Pass: 100%/4   | Total: 26m 23s | Avg:  6m 35s | Max:  8m 18s | Hits:  84%/2488  
      🟩 GCC10              Pass: 100%/2   | Total: 13m 52s | Avg:  6m 56s | Max:  7m 31s | Hits:  79%/1246  
      🟩 GCC11              Pass: 100%/1   | Total:  7m 41s | Avg:  7m 41s | Max:  7m 41s | Hits:  79%/622   
      🟩 GCC12              Pass: 100%/1   | Total:  6m 59s | Avg:  6m 59s | Max:  6m 59s | Hits:  79%/622   
      🟩 GCC13              Pass: 100%/8   | Total: 57m 38s | Avg:  7m 12s | Max: 11m 21s | Hits:  84%/4976  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 14m 58s | Avg: 14m 58s | Max: 14m 58s | Hits:  56%/321   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 44m 14s | Avg: 14m 44s | Max: 15m 39s | Hits:  55%/969   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 22m 53s | Avg: 11m 26s | Max: 11m 36s | Hits:  76%/1240  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total:  1h 03m | Avg:  6m 23s | Max:  8m 18s | Hits:  81%/6222  
      🟩 GCC                Pass: 100%/12  | Total:  1h 26m | Avg:  7m 10s | Max: 11m 21s | Hits:  82%/7466  
      🟩 MSVC               Pass: 100%/4   | Total: 59m 12s | Avg: 14m 48s | Max: 15m 39s | Hits:  55%/1290  
      🟩 NVHPC              Pass: 100%/2   | Total: 22m 53s | Avg: 11m 26s | Max: 11m 36s | Hits:  76%/1240  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 12m 48s | Avg:  6m 24s | Max:  7m 19s | Hits:  89%/1244  
      🟩 rtx2080            Pass: 100%/26  | Total:  3h 39m | Avg:  8m 26s | Max: 15m 39s | Hits:  78%/14974 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  3h 25m | Avg:  8m 12s | Max: 15m 39s | Hits:  77%/14352 
      🟩 Test               Pass: 100%/3   | Total: 26m 58s | Avg:  8m 59s | Max: 11m 21s | Hits:  99%/1866  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 12m 48s | Avg:  6m 24s | Max:  7m 19s | Hits:  89%/1244  
      🟩 90;90a             Pass: 100%/2   | Total: 20m 58s | Avg: 10m 29s | Max: 14m 31s | Hits:  71%/945   
      🟩 100;120            Pass: 100%/2   | Total: 20m 31s | Avg: 10m 15s | Max: 14m 04s | Hits:  71%/945   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 23m 26s | Avg:  7m 48s | Max: 11m 36s | Hits:  78%/1864  
      🟩 20                 Pass: 100%/25  | Total:  3h 28m | Avg:  8m 20s | Max: 15m 39s | Hits:  79%/14354 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 14m 14s | Avg: 3m 33s | Max: 4m 36s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 14m 14s | Avg:  3m 33s | Max:  4m 36s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  6m 16s | Avg:  3m 08s | Max:  3m 21s
      🟩 12.9               Pass: 100%/2   | Total:  7m 58s | Avg:  3m 59s | Max:  4m 36s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  6m 16s | Avg:  3m 08s | Max:  3m 21s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  7m 58s | Avg:  3m 59s | Max:  4m 36s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 14m 14s | Avg:  3m 33s | Max:  4m 36s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  3m 21s | Avg:  3m 21s | Max:  3m 21s
      🟩 Clang19            Pass: 100%/1   | Total:  4m 36s | Avg:  4m 36s | Max:  4m 36s
      🟩 GCC12              Pass: 100%/1   | Total:  2m 55s | Avg:  2m 55s | Max:  2m 55s
      🟩 GCC13              Pass: 100%/1   | Total:  3m 22s | Avg:  3m 22s | Max:  3m 22s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  7m 57s | Avg:  3m 58s | Max:  4m 36s
      🟩 GCC                Pass: 100%/2   | Total:  6m 17s | Avg:  3m 08s | Max:  3m 22s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 14m 14s | Avg:  3m 33s | Max:  4m 36s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 14m 14s | Avg:  3m 33s | Max:  4m 36s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

@pciolkosz
pciolkosz force-pushed the arch_traits_use_types branch from 79b8475 to d0a64c4 Compare July 15, 2025 19:19
@github-actions

Copy link
Copy Markdown
Contributor
🟩 CI finished in 20m 31s: Pass: 100%/32 | Total: 4h 10m | Avg: 7m 49s | Max: 18m 14s | Hits: 79%/16246
  • 🟩 cudax: Pass: 100%/28 | Total: 3h 56m | Avg: 8m 26s | Max: 18m 14s | Hits: 79%/16246

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  3h 31m | Avg:  8m 49s | Max: 18m 14s | Hits:  79%/13754 
      🟩 arm64              Pass: 100%/4   | Total: 24m 36s | Avg:  6m 09s | Max:  6m 38s | Hits:  79%/2492  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 29m 56s | Avg:  9m 58s | Max: 18m 14s | Hits:  75%/1568  
      🟩 12.9               Pass: 100%/25  | Total:  3h 26m | Avg:  8m 15s | Max: 15m 31s | Hits:  80%/14678 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 29m 56s | Avg:  9m 58s | Max: 18m 14s | Hits:  75%/1568  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  3h 26m | Avg:  8m 15s | Max: 15m 31s | Hits:  80%/14678 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  3h 56m | Avg:  8m 26s | Max: 18m 14s | Hits:  79%/16246 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total: 11m 51s | Avg:  5m 55s | Max:  6m 22s | Hits:  79%/1248  
      🟩 Clang15            Pass: 100%/1   | Total:  6m 09s | Avg:  6m 09s | Max:  6m 09s | Hits:  79%/623   
      🟩 Clang16            Pass: 100%/1   | Total:  7m 25s | Avg:  7m 25s | Max:  7m 25s | Hits:  79%/623   
      🟩 Clang17            Pass: 100%/1   | Total:  6m 34s | Avg:  6m 34s | Max:  6m 34s | Hits:  79%/623   
      🟩 Clang18            Pass: 100%/1   | Total:  6m 26s | Avg:  6m 26s | Max:  6m 26s | Hits:  79%/623   
      🟩 Clang19            Pass: 100%/4   | Total: 26m 45s | Avg:  6m 41s | Max:  8m 22s | Hits:  84%/2492  
      🟩 GCC10              Pass: 100%/2   | Total: 12m 53s | Avg:  6m 26s | Max:  6m 40s | Hits:  79%/1248  
      🟩 GCC11              Pass: 100%/1   | Total:  7m 05s | Avg:  7m 05s | Max:  7m 05s | Hits:  79%/623   
      🟩 GCC12              Pass: 100%/1   | Total:  7m 17s | Avg:  7m 17s | Max:  7m 17s | Hits:  79%/623   
      🟩 GCC13              Pass: 100%/8   | Total: 59m 05s | Avg:  7m 23s | Max: 11m 54s | Hits:  84%/4984  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 18m 14s | Avg: 18m 14s | Max: 18m 14s | Hits:  56%/322   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 44m 00s | Avg: 14m 40s | Max: 15m 31s | Hits:  55%/972   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 22m 28s | Avg: 11m 14s | Max: 11m 45s | Hits:  76%/1242  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total:  1h 05m | Avg:  6m 31s | Max:  8m 22s | Hits:  81%/6232  
      🟩 GCC                Pass: 100%/12  | Total:  1h 26m | Avg:  7m 11s | Max: 11m 54s | Hits:  82%/7478  
      🟩 MSVC               Pass: 100%/4   | Total:  1h 02m | Avg: 15m 33s | Max: 18m 14s | Hits:  56%/1294  
      🟩 NVHPC              Pass: 100%/2   | Total: 22m 28s | Avg: 11m 14s | Max: 11m 45s | Hits:  76%/1242  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 13m 05s | Avg:  6m 32s | Max:  7m 21s | Hits:  89%/1246  
      🟩 rtx2080            Pass: 100%/26  | Total:  3h 43m | Avg:  8m 34s | Max: 18m 14s | Hits:  78%/15000 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  3h 28m | Avg:  8m 20s | Max: 18m 14s | Hits:  77%/14377 
      🟩 Test               Pass: 100%/3   | Total: 27m 37s | Avg:  9m 12s | Max: 11m 54s | Hits:  99%/1869  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 13m 05s | Avg:  6m 32s | Max:  7m 21s | Hits:  89%/1246  
      🟩 90;90a             Pass: 100%/2   | Total: 21m 22s | Avg: 10m 41s | Max: 14m 24s | Hits:  71%/947   
      🟩 100;120            Pass: 100%/2   | Total: 20m 43s | Avg: 10m 21s | Max: 14m 05s | Hits:  71%/947   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 22m 59s | Avg:  7m 39s | Max: 10m 43s | Hits:  78%/1867  
      🟩 20                 Pass: 100%/25  | Total:  3h 33m | Avg:  8m 31s | Max: 18m 14s | Hits:  79%/14379 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 14m 18s | Avg: 3m 34s | Max: 3m 47s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 14m 18s | Avg:  3m 34s | Max:  3m 47s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  7m 10s | Avg:  3m 35s | Max:  3m 43s
      🟩 12.9               Pass: 100%/2   | Total:  7m 08s | Avg:  3m 34s | Max:  3m 47s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  7m 10s | Avg:  3m 35s | Max:  3m 43s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  7m 08s | Avg:  3m 34s | Max:  3m 47s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 14m 18s | Avg:  3m 34s | Max:  3m 47s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  3m 27s | Avg:  3m 27s | Max:  3m 27s
      🟩 Clang19            Pass: 100%/1   | Total:  3m 21s | Avg:  3m 21s | Max:  3m 21s
      🟩 GCC12              Pass: 100%/1   | Total:  3m 43s | Avg:  3m 43s | Max:  3m 43s
      🟩 GCC13              Pass: 100%/1   | Total:  3m 47s | Avg:  3m 47s | Max:  3m 47s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  6m 48s | Avg:  3m 24s | Max:  3m 27s
      🟩 GCC                Pass: 100%/2   | Total:  7m 30s | Avg:  3m 45s | Max:  3m 47s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 14m 18s | Avg:  3m 34s | Max:  3m 47s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 14m 18s | Avg:  3m 34s | Max:  3m 47s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

Comment on lines +182 to +185
// @brief Architecture type
// This type is a template that represents an architecture. It also contains the traits for that architecture.
template <id _Id>
struct type;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am with @ericniebler here, it would be nice to turn this into inline variables

struct traits_t
{
// Maximum number of threads per block
static constexpr int max_threads_per_block = 1024;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not of a fan of demoting compile time constants to runtime values. We probably want to use those in a if constexpr at some point

Note that you can always do sm_XY::traits.foo_trait for static variables too

@github-actions

Copy link
Copy Markdown
Contributor
🟩 CI finished in 24m 45s: Pass: 100%/32 | Total: 4h 05m | Avg: 7m 39s | Max: 15m 56s | Hits: 80%/16246
  • 🟩 cudax: Pass: 100%/28 | Total: 3h 51m | Avg: 8m 15s | Max: 15m 56s | Hits: 80%/16246

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  3h 26m | Avg:  8m 36s | Max: 15m 56s | Hits:  80%/13754 
      🟩 arm64              Pass: 100%/4   | Total: 24m 34s | Avg:  6m 08s | Max:  6m 47s | Hits:  79%/2492  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 27m 28s | Avg:  9m 09s | Max: 15m 56s | Hits:  75%/1568  
      🟩 12.9               Pass: 100%/25  | Total:  3h 23m | Avg:  8m 08s | Max: 15m 00s | Hits:  81%/14678 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 27m 28s | Avg:  9m 09s | Max: 15m 56s | Hits:  75%/1568  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  3h 23m | Avg:  8m 08s | Max: 15m 00s | Hits:  81%/14678 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  3h 51m | Avg:  8m 15s | Max: 15m 56s | Hits:  80%/16246 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total: 11m 41s | Avg:  5m 50s | Max:  6m 45s | Hits:  79%/1248  
      🟩 Clang15            Pass: 100%/1   | Total:  6m 47s | Avg:  6m 47s | Max:  6m 47s | Hits:  79%/623   
      🟩 Clang16            Pass: 100%/1   | Total:  6m 08s | Avg:  6m 08s | Max:  6m 08s | Hits:  79%/623   
      🟩 Clang17            Pass: 100%/1   | Total:  6m 49s | Avg:  6m 49s | Max:  6m 49s | Hits:  79%/623   
      🟩 Clang18            Pass: 100%/1   | Total:  6m 37s | Avg:  6m 37s | Max:  6m 37s | Hits:  79%/623   
      🟩 Clang19            Pass: 100%/4   | Total: 22m 50s | Avg:  5m 42s | Max:  7m 55s | Hits:  89%/2492  
      🟩 GCC10              Pass: 100%/2   | Total: 13m 32s | Avg:  6m 46s | Max:  6m 56s | Hits:  79%/1248  
      🟩 GCC11              Pass: 100%/1   | Total:  7m 24s | Avg:  7m 24s | Max:  7m 24s | Hits:  79%/623   
      🟩 GCC12              Pass: 100%/1   | Total:  7m 21s | Avg:  7m 21s | Max:  7m 21s | Hits:  79%/623   
      🟩 GCC13              Pass: 100%/8   | Total:  1h 00m | Avg:  7m 36s | Max: 10m 30s | Hits:  84%/4984  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 15m 56s | Avg: 15m 56s | Max: 15m 56s | Hits:  56%/322   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 44m 01s | Avg: 14m 40s | Max: 15m 00s | Hits:  55%/972   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 21m 13s | Avg: 10m 36s | Max: 10m 39s | Hits:  76%/1242  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total:  1h 00m | Avg:  6m 05s | Max:  7m 55s | Hits:  83%/6232  
      🟩 GCC                Pass: 100%/12  | Total:  1h 29m | Avg:  7m 25s | Max: 10m 30s | Hits:  82%/7478  
      🟩 MSVC               Pass: 100%/4   | Total: 59m 57s | Avg: 14m 59s | Max: 15m 56s | Hits:  56%/1294  
      🟩 NVHPC              Pass: 100%/2   | Total: 21m 13s | Avg: 10m 36s | Max: 10m 39s | Hits:  76%/1242  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 15m 16s | Avg:  7m 38s | Max:  9m 42s | Hits:  89%/1246  
      🟩 rtx2080            Pass: 100%/26  | Total:  3h 35m | Avg:  8m 18s | Max: 15m 56s | Hits:  79%/15000 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  3h 23m | Avg:  8m 07s | Max: 15m 56s | Hits:  78%/14377 
      🟩 Test               Pass: 100%/3   | Total: 28m 07s | Avg:  9m 22s | Max: 10m 30s | Hits:  99%/1869  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 15m 16s | Avg:  7m 38s | Max:  9m 42s | Hits:  89%/1246  
      🟩 90;90a             Pass: 100%/2   | Total: 20m 57s | Avg: 10m 28s | Max: 14m 07s | Hits:  71%/947   
      🟩 100;120            Pass: 100%/2   | Total: 21m 36s | Avg: 10m 48s | Max: 14m 54s | Hits:  71%/947   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 22m 44s | Avg:  7m 34s | Max: 10m 39s | Hits:  78%/1867  
      🟩 20                 Pass: 100%/25  | Total:  3h 28m | Avg:  8m 20s | Max: 15m 56s | Hits:  80%/14379 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 14m 00s | Avg: 3m 30s | Max: 3m 49s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 14m 00s | Avg:  3m 30s | Max:  3m 49s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  6m 42s | Avg:  3m 21s | Max:  3m 30s
      🟩 12.9               Pass: 100%/2   | Total:  7m 18s | Avg:  3m 39s | Max:  3m 49s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  6m 42s | Avg:  3m 21s | Max:  3m 30s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  7m 18s | Avg:  3m 39s | Max:  3m 49s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 14m 00s | Avg:  3m 30s | Max:  3m 49s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  3m 30s | Avg:  3m 30s | Max:  3m 30s
      🟩 Clang19            Pass: 100%/1   | Total:  3m 49s | Avg:  3m 49s | Max:  3m 49s
      🟩 GCC12              Pass: 100%/1   | Total:  3m 12s | Avg:  3m 12s | Max:  3m 12s
      🟩 GCC13              Pass: 100%/1   | Total:  3m 29s | Avg:  3m 29s | Max:  3m 29s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  7m 19s | Avg:  3m 39s | Max:  3m 49s
      🟩 GCC                Pass: 100%/2   | Total:  6m 41s | Avg:  3m 20s | Max:  3m 29s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 14m 00s | Avg:  3m 30s | Max:  3m 49s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 14m 00s | Avg:  3m 30s | Max:  3m 49s
    

πŸ‘ƒ Inspect Changes

Modifications in project?

Project
CCCL Infrastructure
CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

Modifications in project or dependencies?

Project
CCCL Infrastructure
+/- CCCL Packaging
libcu++
CUB
Thrust
+/- CUDA Experimental
stdpar
python
CCCL C Parallel Library
Catch2Helper

πŸƒβ€ Runner counts (total jobs: 32)

# Runner
17 linux-amd64-cpu16
6 linux-amd64-gpu-rtx2080-latest-1
4 windows-amd64-cpu16
4 linux-arm64-cpu16
1 linux-amd64-gpu-h100-latest-1

@pciolkosz

Copy link
Copy Markdown
Contributor Author

I will merge to unblock some other changes, we can always adjust it slightly later

@pciolkosz
pciolkosz merged commit e881d53 into NVIDIA:main Jul 16, 2025
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants