Skip to content

Conversation

@davebayer
Copy link
Contributor

This PR enables <cuda/device> APIs to be used on device by calling CUDA device runtime APIs.

Once this PR is merged, the user will be able to query:

  • number of CUDA devices
  • current device
  • device attributes
    directly inside a kernel.

This change brings more complexity to our testing, because using CUDA device runtime requires linking libcudadevrt and separable compilation.

For that reason I introduced WANTS_CUDADEVRT. tag that informs lit to link libcudadevrt.

I don't know if clang-cuda supports linking with libcudadevrt, will have to find out.

@davebayer davebayer requested a review from a team as a code owner December 9, 2025 14:34
@davebayer davebayer requested a review from pciolkosz December 9, 2025 14:34
@github-project-automation github-project-automation bot moved this to Todo in CCCL Dec 9, 2025
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Dec 9, 2025
@davebayer davebayer force-pushed the enable_device_ref_on_device branch from 9445754 to a8b1556 Compare December 9, 2025 15:03
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

😬 CI Workflow Results

🟥 Finished in 1h 42m: Pass: 47%/91 | Total: 23h 19m | Max: 1h 42m | Hits: 90%/59125

See results here.

@pciolkosz
Copy link
Contributor

Is there some specific use case for these changes? They seem complicated with the libcudadevrt while I think the use case is rare and narrow

@davebayer davebayer marked this pull request as draft December 9, 2025 21:38
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Dec 9, 2025

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 In Review to In Progress in CCCL Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants