Skip to content

[CIR][CUDA] Add target-specific attributes #1457

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

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Conversation

AdUhTkJm
Copy link
Contributor

@AdUhTkJm AdUhTkJm commented Mar 7, 2025

This implements the missing feature cir::setTargetAttributes.

Although other targets might also need attributes, this PR focuses on the CUDA-specific ones. For CUDA kernels (on device side, not stubs), they must have a calling convention of ptx_kernel. It is added here.

CUDA kernels, as well as global variables, also involves lots of NVVM metadata, which is intended to be dealt with at the same place. It's marked with a new missing feature here.

@bcardosolopes
Copy link
Member

LGTM! There's a conflict to be solved

Copy link

github-actions bot commented Mar 8, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@bcardosolopes bcardosolopes merged commit e1bdf8a into llvm:main Mar 11, 2025
6 checks passed
lanza pushed a commit that referenced this pull request Mar 18, 2025
This implements the missing feature `cir::setTargetAttributes`.

Although other targets might also need attributes, this PR focuses on
the CUDA-specific ones. For CUDA kernels (on device side, not stubs),
they must have a calling convention of `ptx_kernel`. It is added here.

CUDA kernels, as well as global variables, also involves lots of NVVM
metadata, which is intended to be dealt with at the same place. It's
marked with a new missing feature here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants