Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/test/unit/intel/test_mxfp_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def mxfp_matmul( #
a_scale, b_scale, #
M, N, K, #
stride_scale, #
stride_am, stride_ak, #
stride_bk, stride_bn, #
stride_cm, stride_cn, #
stride_am: tl.constexpr, stride_ak: tl.constexpr, #
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this increase compilation time? So, each new value requires a recompile, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, but without constexpr, 2d block io cannot be used, and runtime is slow.

stride_bk: tl.constexpr, stride_bn: tl.constexpr, #
stride_cm: tl.constexpr, stride_cn: tl.constexpr, #
DTYPE_A: tl.constexpr, #
DTYPE_B: tl.constexpr, #
BLOCK_M: tl.constexpr, #
Expand Down
4 changes: 2 additions & 2 deletions python/test/unit/language/test_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,9 +1252,9 @@ def create_operand(dtype: str, size0: int, size1: int, k_dim: int, transpose: bo
kernel_kwargs = {}
if is_hip():
kernel_kwargs["matrix_instr_nonkdim"] = nonKDim
if is_xpu() and (128, 256, 256) == (BLOCK_M, BLOCK_N, BLOCK_K) and not CONST_SCALE and not PACK_B_ALONG_K:
kernel_kwargs["num_warps"] = 8
if is_xpu():
# since the block size are big we use num_warps = 32 to avoid pressure problems.
kernel_kwargs["num_warps"] = 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious how you chose it. Why not 16, for example?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32 is the max with double GRF.

kernel_kwargs["grf_mode"] = "256"
out = mxfp8_mxfp4_matmul[grid](a, b, output, a_scale, b_scale, M, N, K, stride_scale, a.stride(0), a.stride(1),
b.stride(0), b.stride(1), output.stride(0), output.stride(1), not CONST_SCALE,
Expand Down
Loading