-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCO-amdgcnTarget: the Radeon 9001XT and suchTarget: the Radeon 9001XT and suchT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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: Add amdgpu target #134740
- Disable
f128
incompiler-builtins
: Disable f128 for amdgpu compiler-builtins#737 - Cast
alloca
s to default address space: Cast allocas to default address space #135025 - Cast global vars to default address space: Cast global variables to default address space #135026
- Add triple to
cc
crate (once target is in nightly) - Add test compiling
core
andalloc
(depends oncc
crate) - Add
gpu-kernel
calling convention: Add gpu-kernel calling convention #135047 - Require
no_mangle
orexport_name
forgpu-kernel
functions - Export
<kernel>.kd
kernel descriptor symbol: Export kernel descriptor for amdgpu kernels #135909 - Require explicit
-C target-cpu=
: Target option to require explicit cpu #135030 - Fix linker-plugin-lto only doing thin lto: Fix linker-plugin-lto only doing thin lto #136840
- Fix requiring lto automatically
- Remove range-metadata amdgpu workaround: Remove range-metadata amdgpu workaround #135027
- Add tests for the
gpu-kernel
calling convention lowering toamdgpu_kernel
and the global variable addrspacecasts - Support shared memory (dynamic and static): Tracking Issue for NVPTX shared memory #135516
- Inline assembly
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: MIR passes do not take into account if an operation is convergent #137086
- Taking structs as arguments to
gpu-kernel
functions does not work correctly - Need
-Clink-arg=--no-gc-sections
when using linker-plugin-lto: AMDGPUTargetStreamer generates .kd symbols, breaking LTO requirement, may be discarded by --gc-sections llvm/llvm-project#119479
mergmann
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCO-amdgcnTarget: the Radeon 9001XT and suchTarget: the Radeon 9001XT and suchT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.