Tracking Issue for amdgcn target
Open
Nobody has claimed this yet.
A-LLVM
C-tracking-issue
O-amdgcn
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This issue tracks the implementation of the amdgpu target.
Old, closed tracking issue: #51575
Current work-in-progress branch: https://github.com/Flakebi/rust/tree/amdgpu
Examples and support libraries: https://github.com/Flakebi/amdgpu-rs
Implementation
- Add amdgpu target: #134740
- Disable
f128incompiler-builtins: https://github.com/rust-lang/compiler-builtins/pull/737 - Cast
allocas to default address space: #135025 - Cast global vars to default address space: #135026
- Add triple to
cccrate (once target is in nightly) (not necessary anymore) - Add test compiling
coreandalloc - Add
gpu-kernelcalling convention: #135047 - Require
no_mangleorexport_nameforgpu-kernelfunctions: #149991 - Export
<kernel>.kdkernel descriptor symbol: #135909 - Require explicit
-C target-cpu=: #135030 - Fix linker-plugin-lto only doing thin lto: #136840
- Fix requiring lto automatically: #149624
- Remove range-metadata amdgpu workaround: #135027
- Add tests for the
gpu-kernelcalling convention lowering toamdgpu_kerneland the global variable addrspacecasts: #146148 - Support shared memory (dynamic): #135516 #146181
- Support shared memory (static): #135516
- Inline assembly: #149793
- Allow vector types: #149994
- Get kernel dispatch packet pointer: #150607
- Tracking Issue for amdgpu arch intrinsics: #149988
Bugs
- Debug compilation fails due to a bug in LLVM’s
AMDGPUResourceUsageAnalysis. This is fixed in llvmmain, so will be fixed with the update to LLVM 20 - rustc may incorrectly copy convergent operations: #137086 #149637 #153995
- Taking structs as arguments to
gpu-kernelfunctions does not work correctly and should be forbidden: #149991 - Need
-Clink-arg=--no-gc-sectionswhen using linker-plugin-lto: https://github.com/llvm/llvm-project/issues/119479 - MergeFunctions LLVM pass can generate invalid calls to kernels. Fixed in llvm
main, so will be fixed with the next LLVM update: #57356 https://github.com/llvm/llvm-project/pull/174254
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the unchecked implementation items, especially static shared memory support and the amdgpu arch intrinsics tracking issue, then follow the referenced issues and current work-in-progress branch. Done means the remaining checklist items are implemented and the corresponding compiler tests and amdgpu target behavior pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100