1
Fork 0
rust/compiler/rustc_codegen_ssa/src/back
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
..
apple Move versioned LLVM target creation to rustc_codegen_ssa 2024-11-01 17:07:18 +01:00
linker Rustfmt 2025-02-08 22:12:13 +00:00
rpath Support rpath with -Clinker-flavor=ld 2024-11-24 01:20:29 +01:00
apple.rs Print env var in --print=deployment-target 2024-11-22 20:46:05 +01:00
archive.rs Rustfmt 2025-02-08 22:12:13 +00:00
command.rs Shorten linker output even more when --verbose is not present 2025-01-25 16:04:52 -05:00
link.rs Shorten linker output even more when --verbose is not present 2025-01-25 16:04:52 -05:00
linker.rs Rollup merge of #135909 - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee 2025-02-16 00:51:24 -05:00
lto.rs Make CodegenCx and Builder generic 2025-01-24 16:05:26 -05:00
metadata.rs Rustfmt 2025-02-08 22:12:13 +00:00
mod.rs Move versioned LLVM target creation to rustc_codegen_ssa 2024-11-01 17:07:18 +01:00
rpath.rs Support rpath with -Clinker-flavor=ld 2024-11-24 01:20:29 +01:00
symbol_export.rs Rollup merge of #135909 - Flakebi:amdgpu-kd, r=jieyouxu,workingjubilee 2025-02-16 00:51:24 -05:00
write.rs Make -O mean -C opt-level=3 2025-02-13 19:47:55 +00:00