Skip to content

[libcudacxx] Work around NVCC issue with __restrict__ in launch#8289

Open
pciolkosz wants to merge 2 commits intoNVIDIA:mainfrom
pciolkosz:work_around_nvcc_issue_with_restrict
Open

[libcudacxx] Work around NVCC issue with __restrict__ in launch#8289
pciolkosz wants to merge 2 commits intoNVIDIA:mainfrom
pciolkosz:work_around_nvcc_issue_with_restrict

Conversation

@pciolkosz
Copy link
Copy Markdown
Contributor

Summary

  • __get_kernel_launcher returned a function pointer whose type could be corrupted by __restrict__ qualifiers leaking through nvcc's template machinery. Changed it to return const void* instead, avoiding the type mismatch.
  • Simplified __get_cufunction_of to take const void* directly, removing the unnecessary template parameter.
  • Added a regression test that launches a functor through a function with a __restrict__-qualified pointer parameter.

Test plan

  • Existing launch tests pass
  • New "Launch functor with __restrict__ pointer arg" test validates the fix

@pciolkosz pciolkosz requested a review from a team as a code owner April 3, 2026 20:19
@pciolkosz pciolkosz requested a review from griwes April 3, 2026 20:19
@github-project-automation github-project-automation bot moved this to Todo in CCCL Apr 3, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Apr 3, 2026
Update cudax launch call sites to pass reinterpret_cast<const void*>
to __get_cufunction_of for raw function pointers, matching the new
signature. Apply clang-format fixes.
@github-actions

This comment has been minimized.

@pciolkosz pciolkosz requested a review from a team as a code owner April 3, 2026 21:51
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Apr 3, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@pciolkosz
Copy link
Copy Markdown
Contributor Author

/ok to test 9a80f37

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

🥳 CI Workflow Results

🟩 Finished in 1h 20m: Pass: 100%/149 | Total: 1d 13h | Max: 56m 25s | Hits: 98%/307392

See results here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

1 participant