Skip to content

Commit 944b0a1

Browse files
committed
[AMD] fix bf16x2 dtype codegen
1 parent ebea77d commit 944b0a1

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

src/target/codegen_hip.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ void CodeGenTileLangHIP::PrintVecElemLoad(const std::string &vec, DataType t,
480480
os << "((half2*)(&(" << vec << "." << access[i / 2] << ")))->"
481481
<< access[i % 2];
482482
} else if (t.is_bfloat16()) {
483-
os << "((nv_bfloat162*)(&(" << vec << "." << access[i / 2] << ")))->"
483+
os << "((bfloat16x2*)(&(" << vec << "." << access[i / 2] << ")))->"
484484
<< access[i % 2];
485485
} else if (t.lanes() > 4 && t.lanes() <= 8) {
486486
std::string type_name;

src/tl_templates/hip/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ using half_t = float16_t;
6767
using bfloat16_t = hip_bfloat16;
6868

6969
struct bfloat16x2 {
70-
bfloat16_t data[2];
70+
bfloat16_t x, y;
7171
};
7272

7373
struct bfloat16x4 {

testing/python/amd/test_tilelang_gemm_mfma_intrinsic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def tl_matmul(
5656
A_shared_shape = (block_K, block_M) if a_transposed else (block_M, block_K)
5757
B_shared_shape = (block_N, block_K) if b_transposed else (block_K, block_N)
5858
C_shared_shape = (
59+
block_M // micro_size_x,
5960
block_N // micro_size_y,
6061
micro_size_x,
6162
micro_size_y,

0 commit comments

Comments
 (0)