Skip to content

Commit e44e846

Browse files
chore: Trim benchmark runner test commands to one per subcommand
The benchmark runner test validates the Python wrapper and CLI driver infrastructure, not individual kernel correctness. Reduce test_commands.txt to one representative command per subcommand (conv, layernorm, matmul) to cut compilation overhead from 28 to 8 invocations. Also remove a stale commented-out TODO benchmark from CMakeLists.txt. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu>
1 parent c97aceb commit e44e846

2 files changed

Lines changed: 2 additions & 23 deletions

File tree

benchmarks/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,6 @@ add_fusilli_benchmark(
249249
--device 0 --iter 10 matmul -M 16 -N 32 -K 64 --a_type bf16 --b_type bf16 --out_type bf16
250250
)
251251

252-
# TODO(llvm/torch-mlir#4422): Uncomment after torch-mlir issue is fixed.
253-
# add_fusilli_benchmark(
254-
# NAME fusilli_benchmark_matmul_mixed
255-
# DRIVER fusilli_benchmark_driver
256-
# ARGS
257-
# --device 0 --iter 10 matmul -M 16 -N 32 -K 64 --a_type f32 --b_type bf16 --out_type f32
258-
# )
259-
260252
add_fusilli_benchmark(
261253
NAME fusilli_benchmark_matmul_fp16_transA
262254
DRIVER fusilli_benchmark_driver

benchmarks/test_commands.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,9 @@
1-
# Test convolution benchmarks
1+
# Test one benchmark per subcommand (conv, layernorm, matmul)
22
--device 0 --iter 2 conv -F 1 -n 16 -c 8 -H 8 -W 8 -k 8 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --spatial_dim 2
3-
--device 0 --iter 2 conv --bf16 -F 1 -n 16 -c 16 --in_d 2 -H 8 -W 8 -k 16 --fil_d 2 -y 1 -x 1 --pad_d 0 -p 0 -q 0 --conv_stride_d 2 -u 1 -v 1 --dilation_d 1 -l 1 -j 1 --in_layout NDHWC --out_layout NDHWC --fil_layout NDHWC --spatial_dim 3
4-
--device 0 --iter 2 conv --bf16 -F 2 -n 16 -c 12 -H 8 -W 8 -k 12 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -g 3 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --spatial_dim 2
5-
--device 0 --iter 2 conv --fp16 -F 1 -n 16 -c 384 -H 48 -W 32 -k 384 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -g 6 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --spatial_dim 2
6-
7-
# Test layernorm benchmarks
83
--device 0 --iter 2 layernorm -X 2x3x128 -F 1 -t f32 --layout NCH
9-
--device 0 --iter 2 layernorm -X 2x3x128x128 -F 1 --type bf16 --layout NHWC --elementwise_affine -e 0.01
10-
11-
# Test matmul benchmarks
124
--device 0 --iter 2 matmul -M 16 -N 32 -K 64 --a_type f32 --b_type f32 --out_type f32
13-
--device 0 --iter 2 matmul -M 16 -N 32 -K 64 -B 10 --bias --a_type f32 --b_type f32 --out_type f32 --bias_type f32
14-
--device 0 --iter 2 matmul -M 16 -N 32 -K 64 --transA --a_type bf16 --b_type bf16 --out_type bf16
15-
--device 0 --iter 2 matmul -M 16 -N 32 -K 64 -B 10 --transB --a_type f16 --b_type f16 --out_type f16
165

176
# Test skipping benchmarks
18-
[SKIP] --device 0 --iter 2 conv --bf16 -F 1 -n 16 -c 384 -H 48 -W 32 -k 384 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -g 6 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --spatial_dim 2
19-
[SKIP] --device 0 --iter 2 layernorm --input 2x3x128x128 -F 1 --type f16 --layout NCHW --elementwise_affine
20-
[SKIP] --device 0 --iter 2 matmul -M 16 -N 32 -K 64
7+
[SKIP] --device 0 --iter 2 conv -F 1 -n 16 -c 8 -H 8 -W 8 -k 8 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 --in_layout NHWC --out_layout NHWC --fil_layout NHWC --spatial_dim 2
218

229
# Test empty lines and comments are ignored by the benchmark runner

0 commit comments

Comments
 (0)