rust/compiler/rustc_codegen_ssa
Jacob Pratt 20004d4bdd
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: d5457e4c16/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp (L966)
I wrote [a test](6a9115b121) 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`
2025-02-16 00:51:24 -05:00
..
src Rollup merge of #135909 - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee 2025-02-16 00:51:24 -05:00
Cargo.toml Bump cc to v1.2.13 for the compiler workspace 2025-02-10 00:06:31 -08:00
messages.ftl Rollup merge of #133429 - EnzymeAD:autodiff-middle, r=oli-obk 2025-01-31 00:26:30 -05:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03:00

Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.