Skip to content

Commit 858438d

Browse files
Fallback performance experiment
Signed-off-by: Whitney Tsang <[email protected]>
1 parent 2d1ba45 commit 858438d

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

benchmarks/triton_kernels_benchmark/gemm_tensor_desc_benchmark.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def matmul_kernel_with_tensor_descriptors(
2525
# Pointers to matrices
2626
a_ptr, b_ptr, c_ptr,
2727
# Matrix dimensions
28-
M: tl.constexpr, N: tl.constexpr, K: tl.constexpr,
28+
M, N, K,
2929
# Stride variables
30-
stride_am: tl.constexpr, stride_ak: tl.constexpr, #
31-
stride_bk: tl.constexpr, stride_bn: tl.constexpr, #
32-
stride_cm: tl.constexpr, stride_cn: tl.constexpr,
30+
stride_am, stride_ak, #
31+
stride_bk, stride_bn, #
32+
stride_cm, stride_cn,
3333
# Meta-parameters
3434
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr):
3535
pid = tl.program_id(axis=0)
@@ -71,11 +71,11 @@ def matmul_kernel_with_tensor_descriptors_batched(
7171
# Pointers to matrices
7272
a_ptr, b_ptr, c_ptr,
7373
# Matrix dimensions
74-
B: tl.constexpr, M: tl.constexpr, N: tl.constexpr, K: tl.constexpr,
74+
B, M, N, K,
7575
# Stride variables
76-
stride_az: tl.constexpr, stride_am: tl.constexpr, stride_ak: tl.constexpr, #
77-
stride_bz: tl.constexpr, stride_bk: tl.constexpr, stride_bn: tl.constexpr, #
78-
stride_cz: tl.constexpr, stride_cm: tl.constexpr, stride_cn: tl.constexpr,
76+
stride_az, stride_am, stride_ak, #
77+
stride_bz, stride_bk, stride_bn, #
78+
stride_cz, stride_cm, stride_cn,
7979
# Meta-parameters
8080
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr):
8181
bid = tl.program_id(axis=1)

benchmarks/triton_kernels_benchmark/gemm_tensor_of_ptr_benchmark.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ def matmul_kernel(
2525
# Pointers to matrices
2626
a_ptr, b_ptr, c_ptr,
2727
# Matrix dimensions
28-
M: tl.constexpr, N: tl.constexpr, K: tl.constexpr,
28+
M, N, K,
2929
# Stride variables
30-
stride_am: tl.constexpr, stride_ak: tl.constexpr, #
31-
stride_bk: tl.constexpr, stride_bn: tl.constexpr, #
32-
stride_cm: tl.constexpr, stride_cn: tl.constexpr,
30+
stride_am, stride_ak, #
31+
stride_bk, stride_bn, #
32+
stride_cm, stride_cn,
3333
# Meta-parameters
3434
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr):
3535
pid = tl.program_id(axis=0)
@@ -76,11 +76,11 @@ def matmul_kernel_batched(
7676
# Pointers to matrices
7777
a_ptr, b_ptr, c_ptr,
7878
# Matrix dimensions
79-
B: tl.constexpr, M: tl.constexpr, N: tl.constexpr, K: tl.constexpr,
79+
B, M, N, K,
8080
# Stride variables
81-
stride_az: tl.constexpr, stride_am: tl.constexpr, stride_ak: tl.constexpr, #
82-
stride_bz: tl.constexpr, stride_bk: tl.constexpr, stride_bn: tl.constexpr, #
83-
stride_cz: tl.constexpr, stride_cm: tl.constexpr, stride_cn: tl.constexpr,
81+
stride_az, stride_am, stride_ak, #
82+
stride_bz, stride_bk, stride_bn, #
83+
stride_cz, stride_cm, stride_cn,
8484
# Meta-parameters
8585
BLOCK_SIZE_M: tl.constexpr, BLOCK_SIZE_N: tl.constexpr, BLOCK_SIZE_K: tl.constexpr, GROUP_SIZE_M: tl.constexpr):
8686
bid = tl.program_id(axis=1)

third_party/intel/backend/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def make_ttir(cls, mod, metadata, opt):
207207
pm = ir.pass_manager(mod.context)
208208
pm.enable_debug()
209209
passes.common.add_inliner(pm)
210-
intel.passes.ttir.add_convert_tdesc_to_block_pointer(pm)
210+
#intel.passes.ttir.add_convert_tdesc_to_block_pointer(pm)
211211
passes.ttir.add_rewrite_tensor_descriptor_to_pointer(pm)
212212
passes.common.add_cse(pm)
213213
passes.common.add_licm(pm)

0 commit comments

Comments
 (0)