Open
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
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
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