about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-02-16 00:51:24 -0500
committerGitHub <noreply@github.com>2025-02-16 00:51:24 -0500
commit20004d4bdd787b3e3b664827acafdd6c2ebfbce3 (patch)
tree7a6ad25a790a57d08fa35f28c28d042267cc4d86 /compiler/rustc_codegen_llvm/src
parentaa37d799fc5e01b4cd5e700d67c10d184ae7d321 (diff)
parent99ec64c34c65630d9a66befa2cbf2faa9478baa0 (diff)
downloadrust-20004d4bdd787b3e3b664827acafdd6c2ebfbce3.tar.gz
rust-20004d4bdd787b3e3b664827acafdd6c2ebfbce3.zip
Rollup merge of #135909 - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee
Export kernel descriptor for amdgpu kernels

The host runtime (HIP or HSA) expects a kernel descriptor object for each kernel in the ELF file. The amdgpu LLVM backend generates the object. It is created as a symbol with the name of the kernel plus a `.kd` suffix.

Add it to the exported symbols in the linker script, so that it can be found.

For reference, the symbol is created here in LLVM: https://github.com/llvm/llvm-project/blob/d5457e4c1619e5dbeefd49841e284cbc24d35cb4/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp#L966
I wrote [a test](https://github.com/Flakebi/rust/commit/6a9115b121b48a8cd4aaf100551569dc70c6c704) for this as well, I’ll add that once the target is merged and working.
With this, all PRs to get working code for amdgpu are open (this + the target + the two patches adding addrspacecasts for alloca and global variables).

Tracking issue: #135024

r? `@workingjubilee`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions