mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-27 19:16:36 +00:00
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.
12 lines
226 B
Rust
12 lines
226 B
Rust
#![allow(internal_features)]
|
|
#![feature(no_core, lang_items, abi_gpu_kernel)]
|
|
#![no_core]
|
|
#![no_std]
|
|
|
|
// This is needed because of #![no_core]:
|
|
#[lang = "sized"]
|
|
trait Sized {}
|
|
|
|
#[no_mangle]
|
|
extern "gpu-kernel" fn kernel() {}
|