xref: /llvm-project/clang/test/CodeGenOpenCL/builtins-amdgcn-wmma-w32-gfx10-err.cl (revision b5c0b67bc270936c8fa254dc42d920e867adef54)
1// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2// REQUIRES: amdgpu-registered-target
3// RUN: %clang_cc1 -triple amdgcn-unknown-unknown -target-cpu gfx1030 \
4// RUN:   -verify -DWMMA_GFX1100_TESTS -S -o - %s
5
6
7typedef float  v4f   __attribute__((ext_vector_type(4)));
8typedef float  v8f   __attribute__((ext_vector_type(8)));
9typedef half   v16h  __attribute__((ext_vector_type(16)));
10typedef int    v2i   __attribute__((ext_vector_type(2)));
11typedef int    v4i   __attribute__((ext_vector_type(4)));
12typedef int    v8i   __attribute__((ext_vector_type(8)));
13typedef short  v16s  __attribute__((ext_vector_type(16)));
14
15#ifdef WMMA_GFX1100_TESTS
16
17// Wave32
18
19void test_amdgcn_wmma_f32_16x16x16_bf16_w32(global v8f* out8f, v16s a16s, v16s b16s, v8f c8f,
20                                            global v16h* out16h, v16h a16h, v16h b16h, v16h c16h,
21                                            global v16s* out16s, v2i a2i, v2i b2i, v16s c16s,
22                                            global v8i* out8i, v4i a4i, v4i b4i, v8i c8i)
23{
24 *out8f = __builtin_amdgcn_wmma_f32_16x16x16_f16_w32(a16h, b16h, c8f);  // expected-error{{'__builtin_amdgcn_wmma_f32_16x16x16_f16_w32' needs target feature gfx11-insts,wavefrontsize32}}
25 *out8f = __builtin_amdgcn_wmma_f32_16x16x16_bf16_w32(a16s, b16s, c8f);  // expected-error{{'__builtin_amdgcn_wmma_f32_16x16x16_bf16_w32' needs target feature gfx11-insts,wavefrontsize32}}
26 *out16h = __builtin_amdgcn_wmma_f16_16x16x16_f16_w32(a16h, b16h, c16h, true); // expected-error{{'__builtin_amdgcn_wmma_f16_16x16x16_f16_w32' needs target feature gfx11-insts,wavefrontsize32}}
27 *out16s = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32(a16s, b16s, c16s, true); // expected-error{{'__builtin_amdgcn_wmma_bf16_16x16x16_bf16_w32' needs target feature gfx11-insts,wavefrontsize32}}
28 *out16h = __builtin_amdgcn_wmma_f16_16x16x16_f16_tied_w32(a16h, b16h, c16h, true); // expected-error{{'__builtin_amdgcn_wmma_f16_16x16x16_f16_tied_w32' needs target feature gfx11-insts,wavefrontsize32}}
29 *out16s = __builtin_amdgcn_wmma_bf16_16x16x16_bf16_tied_w32(a16s, b16s, c16s, true); // expected-error{{'__builtin_amdgcn_wmma_bf16_16x16x16_bf16_tied_w32' needs target feature gfx11-insts,wavefrontsize32}}
30 *out8i = __builtin_amdgcn_wmma_i32_16x16x16_iu8_w32(true, a4i, true, b4i, c8i, false); // expected-error{{'__builtin_amdgcn_wmma_i32_16x16x16_iu8_w32' needs target feature gfx11-insts,wavefrontsize32}}
31 *out8i = __builtin_amdgcn_wmma_i32_16x16x16_iu4_w32(true, a2i, true, b2i, c8i, false); // expected-error{{'__builtin_amdgcn_wmma_i32_16x16x16_iu4_w32' needs target feature gfx11-insts,wavefrontsize32}}
32}
33
34#endif
35