Skip to content

Commit 15c6585

Browse files
committed
Add amdgpu to gpu-kernel test
Check that the gpu-kernel calling convention translates to `amdgpu_kernel` when compiling for the amdgpu target.
1 parent 485bdaf commit 15c6585

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Checks that the gpu-kernel calling convention correctly translates to LLVM calling conventions.
22

33
//@ add-core-stubs
4-
//@ revisions: nvptx
4+
//@ revisions: amdgpu nvptx
5+
//@ [amdgpu] compile-flags: --crate-type=rlib --target=amdgcn-amd-amdhsa -Ctarget-cpu=gfx900
6+
//@ [amdgpu] needs-llvm-components: amdgpu
57
//@ [nvptx] compile-flags: --crate-type=rlib --target=nvptx64-nvidia-cuda
68
//@ [nvptx] needs-llvm-components: nvptx
79
#![feature(no_core, lang_items, abi_gpu_kernel)]
@@ -10,6 +12,7 @@
1012
extern crate minicore;
1113
use minicore::*;
1214

15+
// amdgpu: define amdgpu_kernel void @fun(i32
1316
// nvptx: define ptx_kernel void @fun(i32
1417
#[no_mangle]
1518
pub extern "gpu-kernel" fn fun(_: i32) {}

0 commit comments

Comments
 (0)