Skip to content

refactor the starts_on algorithm for shorter symbol length - #5088

Merged
ericniebler merged 2 commits into
NVIDIA:mainfrom
ericniebler:refactor-starts-on
Jun 29, 2025
Merged

ericniebler merged 2 commits into
NVIDIA:mainfrom
ericniebler:refactor-starts-on

Conversation

@ericniebler

Copy link
Copy Markdown
Contributor

Description

this pr is a continuation of the work done in #5065 to reduce symbol length for complicated sender expressions. symbol length explodes when receiver types depend on sender types, causing the (already long) sender symbol to appear twice in the type of the resulting operation state. #5065 refactored the algorithms so that the receivers do not depend on the types of the sender.

that pr did not refactor the starts_on algorithm because the type of the starts_on receiver necessarily depends on the type of the child sender since it (the receiver) must start the child operation.

this pr removes that dependency by adding an indirection through a function pointer. the receiver calls through a pointer to a function that knows the type of the child operation and can start it.

in addition to refactoring the starts_on algorithm, this pr:

  • adds tests for starts_on
  • changes the get_domain[_override] queries to decay their return type (fixing a bug exposed by the new starts_on tests)
  • moves the definition of __sch_env_t out of the starts_on implementation to env.cuh where it can be reused
  • gives the starts_on(sch, sndr) sender a get_domain_override attribute that returns the domain of the scheduler, sch, as per P3718R0. that forces connect to use the scheduler's domain to find a sender transform.

a note for reviewers: the first commit in this pr is the subject of #5087. for this pr, only the commit(s) after the first are relevant.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Jun 28, 2025

Copy link
Copy Markdown
Contributor

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.

@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Progress in CCCL Jun 29, 2025
@ericniebler
ericniebler force-pushed the refactor-starts-on branch 2 times, most recently from 3884514 to 781649c Compare June 29, 2025 00:24
@ericniebler

Copy link
Copy Markdown
Contributor Author

/ok to test 781649c

@github-actions

Copy link
Copy Markdown
Contributor
🟨 CI finished in 16m 06s: Pass: 81%/32 | Total: 2h 51m | Avg: 5m 21s | Max: 11m 49s | Hits: 99%/13556
  • 🟨 cudax: Pass: 78%/28 | Total: 2h 37m | Avg: 5m 37s | Max: 11m 49s | Hits: 99%/13556

    🔍 cpu: amd64 🔍
      🔍 amd64              Pass:  75%/24  | Total:  2h 24m | Avg:  6m 02s | Max: 11m 49s | Hits:  99%/11092 
      🟩 arm64              Pass: 100%/4   | Total: 12m 33s | Avg:  3m 08s | Max:  3m 22s | Hits:  99%/2464  
    🔍 gpu: rtx2080 🔍
      🟩 h100               Pass: 100%/2   | Total: 13m 19s | Avg:  6m 39s | Max:  9m 55s | Hits:  99%/1232  
      🔍 rtx2080            Pass:  76%/26  | Total:  2h 24m | Avg:  5m 32s | Max: 11m 49s | Hits:  99%/12324 
    🔍 jobs: Build 🔍
      🔍 Build              Pass:  76%/25  | Total:  2h 08m | Avg:  5m 08s | Max: 11m 49s | Hits:  99%/11708 
      🟩 Test               Pass: 100%/3   | Total: 29m 01s | Avg:  9m 40s | Max: 10m 25s | Hits:  99%/1848  
    🟨 cxx
      🟩 Clang14            Pass: 100%/2   | Total:  6m 54s | Avg:  3m 27s | Max:  3m 34s | Hits: 100%/1234  
      🟩 Clang15            Pass: 100%/1   | Total:  3m 30s | Avg:  3m 30s | Max:  3m 30s | Hits: 100%/616   
      🟩 Clang16            Pass: 100%/1   | Total:  3m 18s | Avg:  3m 18s | Max:  3m 18s | Hits: 100%/616   
      🟩 Clang17            Pass: 100%/1   | Total:  3m 25s | Avg:  3m 25s | Max:  3m 25s | Hits: 100%/616   
      🟩 Clang18            Pass: 100%/1   | Total:  3m 23s | Avg:  3m 23s | Max:  3m 23s | Hits: 100%/616   
      🟩 Clang19            Pass: 100%/4   | Total: 18m 09s | Avg:  4m 32s | Max:  8m 41s | Hits: 100%/2464  
      🟩 GCC10              Pass: 100%/2   | Total:  7m 11s | Avg:  3m 35s | Max:  3m 41s | Hits:  99%/1234  
      🟩 GCC11              Pass: 100%/1   | Total:  3m 44s | Avg:  3m 44s | Max:  3m 44s | Hits:  99%/616   
      🟩 GCC12              Pass: 100%/1   | Total:  3m 56s | Avg:  3m 56s | Max:  3m 56s | Hits:  99%/616   
      🟩 GCC13              Pass: 100%/8   | Total: 41m 47s | Avg:  5m 13s | Max: 10m 25s | Hits:  99%/4928  
      🟥 MSVC14.39          Pass:   0%/1   | Total: 11m 03s | Avg: 11m 03s | Max: 11m 03s
      🟥 MSVC14.43          Pass:   0%/3   | Total: 34m 47s | Avg: 11m 35s | Max: 11m 49s
      🟥 NVHPC25.5          Pass:   0%/2   | Total: 16m 17s | Avg:  8m 08s | Max:  8m 14s
    🟨 cxx_family
      🟩 Clang              Pass: 100%/10  | Total: 38m 39s | Avg:  3m 51s | Max:  8m 41s | Hits: 100%/6162  
      🟩 GCC                Pass: 100%/12  | Total: 56m 38s | Avg:  4m 43s | Max: 10m 25s | Hits:  99%/7394  
      🟥 MSVC               Pass:   0%/4   | Total: 45m 50s | Avg: 11m 27s | Max: 11m 49s
      🟥 NVHPC              Pass:   0%/2   | Total: 16m 17s | Avg:  8m 08s | Max:  8m 14s
    🟨 sm
      🟩 90                 Pass: 100%/2   | Total: 13m 19s | Avg:  6m 39s | Max:  9m 55s | Hits:  99%/1232  
      🟨 90;90a             Pass:  50%/2   | Total: 15m 14s | Avg:  7m 37s | Max: 11m 42s | Hits:  99%/616   
      🟨 100;120            Pass:  50%/2   | Total: 15m 04s | Avg:  7m 32s | Max: 11m 16s | Hits:  99%/616   
    🟨 cudacxx_family
      🟨 nvcc               Pass:  78%/28  | Total:  2h 37m | Avg:  5m 37s | Max: 11m 49s | Hits:  99%/13556 
    🟨 ctk
      🟨 12.0               Pass:  66%/3   | Total: 17m 53s | Avg:  5m 57s | Max: 11m 03s | Hits:  99%/1232  
      🟨 12.9               Pass:  80%/25  | Total:  2h 19m | Avg:  5m 34s | Max: 11m 49s | Hits:  99%/12324 
    🟨 cudacxx
      🟨 nvcc12.0           Pass:  66%/3   | Total: 17m 53s | Avg:  5m 57s | Max: 11m 03s | Hits:  99%/1232  
      🟨 nvcc12.9           Pass:  80%/25  | Total:  2h 19m | Avg:  5m 34s | Max: 11m 49s | Hits:  99%/12324 
    🟨 std
      🟨 17                 Pass:  66%/3   | Total: 14m 29s | Avg:  4m 49s | Max:  8m 14s | Hits:  99%/1232  
      🟨 20                 Pass:  80%/25  | Total:  2h 22m | Avg:  5m 43s | Max: 11m 49s | Hits:  99%/12324 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 13m 55s | Avg: 3m 28s | Max: 4m 30s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 13m 55s | Avg:  3m 28s | Max:  4m 30s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  7m 15s | Avg:  3m 37s | Max:  4m 30s
      🟩 12.9               Pass: 100%/2   | Total:  6m 40s | Avg:  3m 20s | Max:  3m 42s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  7m 15s | Avg:  3m 37s | Max:  4m 30s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  6m 40s | Avg:  3m 20s | Max:  3m 42s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 13m 55s | Avg:  3m 28s | Max:  4m 30s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  2m 45s | Avg:  2m 45s | Max:  2m 45s
      🟩 Clang19            Pass: 100%/1   | Total:  3m 42s | Avg:  3m 42s | Max:  3m 42s
      🟩 GCC12              Pass: 100%/1   | Total:  4m 30s | Avg:  4m 30s | Max:  4m 30s
      🟩 GCC13              Pass: 100%/1   | Total:  2m 58s | Avg:  2m 58s | Max:  2m 58s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  6m 27s | Avg:  3m 13s | Max:  3m 42s
      🟩 GCC                Pass: 100%/2   | Total:  7m 28s | Avg:  3m 44s | Max:  4m 30s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 13m 55s | Avg:  3m 28s | Max:  4m 30s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 13m 55s | Avg:  3m 28s | Max:  4m 30s
    

👃 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

@ericniebler

Copy link
Copy Markdown
Contributor Author

/ok to test 71c474f

@ericniebler
ericniebler marked this pull request as ready for review June 29, 2025 01:08
@ericniebler
ericniebler requested review from a team as code owners June 29, 2025 01:08
@cccl-authenticator-app cccl-authenticator-app Bot moved this from In Progress to In Review in CCCL Jun 29, 2025
@github-actions

Copy link
Copy Markdown
Contributor
🟩 CI finished in 15m 44s: Pass: 100%/32 | Total: 2h 52m | Avg: 5m 23s | Max: 12m 08s | Hits: 99%/16050
  • 🟩 cudax: Pass: 100%/28 | Total: 2h 37m | Avg: 5m 38s | Max: 12m 08s | Hits: 99%/16050

    🟩 cpu
      🟩 amd64              Pass: 100%/24  | Total:  2h 24m | Avg:  6m 01s | Max: 12m 08s | Hits:  99%/13586 
      🟩 arm64              Pass: 100%/4   | Total: 13m 11s | Avg:  3m 17s | Max:  3m 35s | Hits:  99%/2464  
    🟩 ctk
      🟩 12.0               Pass: 100%/3   | Total: 18m 41s | Avg:  6m 13s | Max: 11m 51s | Hits:  98%/1547  
      🟩 12.9               Pass: 100%/25  | Total:  2h 19m | Avg:  5m 34s | Max: 12m 08s | Hits:  99%/14503 
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/3   | Total: 18m 41s | Avg:  6m 13s | Max: 11m 51s | Hits:  98%/1547  
      🟩 nvcc12.9           Pass: 100%/25  | Total:  2h 19m | Avg:  5m 34s | Max: 12m 08s | Hits:  99%/14503 
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/28  | Total:  2h 37m | Avg:  5m 38s | Max: 12m 08s | Hits:  99%/16050 
    🟩 cxx
      🟩 Clang14            Pass: 100%/2   | Total:  6m 45s | Avg:  3m 22s | Max:  3m 23s | Hits:  99%/1234  
      🟩 Clang15            Pass: 100%/1   | Total:  3m 53s | Avg:  3m 53s | Max:  3m 53s | Hits:  99%/616   
      🟩 Clang16            Pass: 100%/1   | Total:  3m 36s | Avg:  3m 36s | Max:  3m 36s | Hits:  99%/616   
      🟩 Clang17            Pass: 100%/1   | Total:  3m 37s | Avg:  3m 37s | Max:  3m 37s | Hits:  99%/616   
      🟩 Clang18            Pass: 100%/1   | Total:  3m 21s | Avg:  3m 21s | Max:  3m 21s | Hits:  99%/616   
      🟩 Clang19            Pass: 100%/4   | Total: 18m 00s | Avg:  4m 30s | Max:  8m 17s | Hits:  99%/2464  
      🟩 GCC10              Pass: 100%/2   | Total:  7m 11s | Avg:  3m 35s | Max:  3m 43s | Hits:  99%/1234  
      🟩 GCC11              Pass: 100%/1   | Total:  3m 51s | Avg:  3m 51s | Max:  3m 51s | Hits:  99%/616   
      🟩 GCC12              Pass: 100%/1   | Total:  4m 16s | Avg:  4m 16s | Max:  4m 16s | Hits:  99%/616   
      🟩 GCC13              Pass: 100%/8   | Total: 41m 52s | Avg:  5m 14s | Max:  9m 56s | Hits:  99%/4928  
      🟩 MSVC14.39          Pass: 100%/1   | Total: 11m 51s | Avg: 11m 51s | Max: 11m 51s | Hits:  95%/315   
      🟩 MSVC14.43          Pass: 100%/3   | Total: 34m 41s | Avg: 11m 33s | Max: 12m 08s | Hits:  95%/951   
      🟩 NVHPC25.5          Pass: 100%/2   | Total: 14m 58s | Avg:  7m 29s | Max:  7m 45s | Hits:  96%/1228  
    🟩 cxx_family
      🟩 Clang              Pass: 100%/10  | Total: 39m 12s | Avg:  3m 55s | Max:  8m 17s | Hits:  99%/6162  
      🟩 GCC                Pass: 100%/12  | Total: 57m 10s | Avg:  4m 45s | Max:  9m 56s | Hits:  99%/7394  
      🟩 MSVC               Pass: 100%/4   | Total: 46m 32s | Avg: 11m 38s | Max: 12m 08s | Hits:  95%/1266  
      🟩 NVHPC              Pass: 100%/2   | Total: 14m 58s | Avg:  7m 29s | Max:  7m 45s | Hits:  96%/1228  
    🟩 gpu
      🟩 h100               Pass: 100%/2   | Total: 13m 24s | Avg:  6m 42s | Max:  9m 56s | Hits:  99%/1232  
      🟩 rtx2080            Pass: 100%/26  | Total:  2h 24m | Avg:  5m 33s | Max: 12m 08s | Hits:  99%/14818 
    🟩 jobs
      🟩 Build              Pass: 100%/25  | Total:  2h 09m | Avg:  5m 11s | Max: 12m 08s | Hits:  99%/14202 
      🟩 Test               Pass: 100%/3   | Total: 28m 05s | Avg:  9m 21s | Max:  9m 56s | Hits:  99%/1848  
    🟩 sm
      🟩 90                 Pass: 100%/2   | Total: 13m 24s | Avg:  6m 42s | Max:  9m 56s | Hits:  99%/1232  
      🟩 90;90a             Pass: 100%/2   | Total: 15m 35s | Avg:  7m 47s | Max: 11m 46s | Hits:  98%/933   
      🟩 100;120            Pass: 100%/2   | Total: 14m 31s | Avg:  7m 15s | Max: 10m 47s | Hits:  98%/933   
    🟩 std
      🟩 17                 Pass: 100%/3   | Total: 14m 18s | Avg:  4m 46s | Max:  7m 45s | Hits:  98%/1846  
      🟩 20                 Pass: 100%/25  | Total:  2h 23m | Avg:  5m 44s | Max: 12m 08s | Hits:  99%/14204 
    
  • 🟩 packaging: Pass: 100%/4 | Total: 14m 53s | Avg: 3m 43s | Max: 5m 32s

    🟩 cpu
      🟩 amd64              Pass: 100%/4   | Total: 14m 53s | Avg:  3m 43s | Max:  5m 32s
    🟩 ctk
      🟩 12.0               Pass: 100%/2   | Total:  6m 02s | Avg:  3m 01s | Max:  3m 14s
      🟩 12.9               Pass: 100%/2   | Total:  8m 51s | Avg:  4m 25s | Max:  5m 32s
    🟩 cudacxx
      🟩 nvcc12.0           Pass: 100%/2   | Total:  6m 02s | Avg:  3m 01s | Max:  3m 14s
      🟩 nvcc12.9           Pass: 100%/2   | Total:  8m 51s | Avg:  4m 25s | Max:  5m 32s
    🟩 cudacxx_family
      🟩 nvcc               Pass: 100%/4   | Total: 14m 53s | Avg:  3m 43s | Max:  5m 32s
    🟩 cxx
      🟩 Clang14            Pass: 100%/1   | Total:  2m 48s | Avg:  2m 48s | Max:  2m 48s
      🟩 Clang19            Pass: 100%/1   | Total:  5m 32s | Avg:  5m 32s | Max:  5m 32s
      🟩 GCC12              Pass: 100%/1   | Total:  3m 14s | Avg:  3m 14s | Max:  3m 14s
      🟩 GCC13              Pass: 100%/1   | Total:  3m 19s | Avg:  3m 19s | Max:  3m 19s
    🟩 cxx_family
      🟩 Clang              Pass: 100%/2   | Total:  8m 20s | Avg:  4m 10s | Max:  5m 32s
      🟩 GCC                Pass: 100%/2   | Total:  6m 33s | Avg:  3m 16s | Max:  3m 19s
    🟩 gpu
      🟩 rtx2080            Pass: 100%/4   | Total: 14m 53s | Avg:  3m 43s | Max:  5m 32s
    🟩 jobs
      🟩 Test               Pass: 100%/4   | Total: 14m 53s | Avg:  3m 43s | Max:  5m 32s
    

👃 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

@ericniebler
ericniebler merged commit e128f62 into NVIDIA:main Jun 29, 2025
@github-project-automation github-project-automation Bot moved this from In Review to Done in CCCL Jun 29, 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.

2 participants