Add amdgpu to gpu-kernel test

Check that the gpu-kernel calling convention translates to
`amdgpu_kernel` when compiling for the amdgpu target.
This commit is contained in:
Flakebi
2025-01-21 23:21:29 +01:00
parent 485bdafdcf
commit 15c6585e5c

View File

@@ -1,7 +1,9 @@
// Checks that the gpu-kernel calling convention correctly translates to LLVM calling conventions.
//@ add-core-stubs
//@ revisions: nvptx
//@ revisions: amdgpu nvptx
//@ [amdgpu] compile-flags: --crate-type=rlib --target=amdgcn-amd-amdhsa -Ctarget-cpu=gfx900
//@ [amdgpu] needs-llvm-components: amdgpu
//@ [nvptx] compile-flags: --crate-type=rlib --target=nvptx64-nvidia-cuda
//@ [nvptx] needs-llvm-components: nvptx
#![feature(no_core, lang_items, abi_gpu_kernel)]
@@ -10,6 +12,7 @@
extern crate minicore;
use minicore::*;
// amdgpu: define amdgpu_kernel void @fun(i32
// nvptx: define ptx_kernel void @fun(i32
#[no_mangle]
pub extern "gpu-kernel" fn fun(_: i32) {}