{ "op": "com.microsoft.FusedMatMul", "cases": [ { "name": "fusedmatmul-f32-attn-scores-transB-8x512x64", "preset": "model", "attrs": { "alpha": 0.125, "transB": 1 }, "inputs": { "A": { "shape": [8, 512, 64], "dtype": "float32", "dist": "normal", "seed": 510, "scale": 0.2 }, "B": { "shape": [8, 512, 64], "dtype": "float32", "dist": "normal", "seed": 511, "scale": 0.2 } }, "outputs": { "Y": { "shape": [8, 512, 512], "dtype": "float32" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 512 * 512 * 64" }] } }, { "name": "fusedmatmul-f32-plain-512x2048x512", "preset": "model", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [512, 2048], "dtype": "float32", "dist": "normal", "seed": 520, "scale": 0.1 }, "B": { "shape": [2048, 512], "dtype": "float32", "dist": "normal", "seed": 521, "scale": 0.1 } }, "outputs": { "Y": { "shape": [512, 512], "dtype": "float32" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-plain-512x2048x512", "preset": "model", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [512, 2048], "dtype": "float16", "dist": "normal", "seed": 530, "scale": 0.1 }, "B": { "shape": [2048, 512], "dtype": "float16", "dist": "normal", "seed": 531, "scale": 0.1 } }, "outputs": { "Y": { "shape": [512, 512], "dtype": "float16" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f32-unaligned-500x2000x500", "preset": "model", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [500, 2000], "dtype": "float32", "dist": "normal", "seed": 540, "scale": 0.1 }, "B": { "shape": [2000, 500], "dtype": "float32", "dist": "normal", "seed": 541, "scale": 0.1 } }, "outputs": { "Y": { "shape": [500, 500], "dtype": "float32" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 500 * 500 * 2000" }] } }, { "name": "fusedmatmul-f32-unaligned2-384x1536x400", "preset": "model", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [384, 1536], "dtype": "float32", "dist": "normal", "seed": 560, "scale": 0.1 }, "B": { "shape": [1536, 400], "dtype": "float32", "dist": "normal", "seed": 561, "scale": 0.1 } }, "outputs": { "Y": { "shape": [384, 400], "dtype": "float32" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 384 * 400 * 1536" }] } }, { "name": "fusedmatmul-f16-aligned-n512-512x2048x512-healthy", "preset": "smoke", "attrs": { "alpha": 1 }, "vars": { "M": 512, "K": 2048, "N": 512 }, "inputs": { "A": { "shape": [512, 2048], "dtype": "float16", "dist": "normal", "seed": 600, "scale": 0.1 }, "B": { "shape": [2048, 512], "dtype": "float16", "dist": "normal", "seed": 601, "scale": 0.1 } }, "outputs": { "Y": { "shape": [512, 512], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-unaligned-n500-512x2048x500-cliff", "preset": "smoke", "attrs": { "alpha": 1 }, "vars": { "M": 512, "K": 2048, "N": 500 }, "inputs": { "A": { "shape": [512, 2048], "dtype": "float16", "dist": "normal", "seed": 602, "scale": 0.1 }, "B": { "shape": [2048, 500], "dtype": "float16", "dist": "normal", "seed": 603, "scale": 0.1 } }, "outputs": { "Y": { "shape": [512, 500], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 512 * 500 * 2048" }] } }, { "name": "fusedmatmul-f16-unaligned-k2050-512x2050x512-cliff", "preset": "smoke", "attrs": { "alpha": 1 }, "vars": { "M": 512, "K": 2050, "N": 512 }, "inputs": { "A": { "shape": [512, 2050], "dtype": "float16", "dist": "normal", "seed": 604, "scale": 0.1 }, "B": { "shape": [2050, 512], "dtype": "float16", "dist": "normal", "seed": 605, "scale": 0.1 } }, "outputs": { "Y": { "shape": [512, 512], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 512 * 512 * 2050" }] } }, { "name": "fusedmatmul-f16-decode-gemv-m1-1x2048x512", "preset": "smoke", "attrs": { "alpha": 1 }, "vars": { "M": 1, "K": 2048, "N": 512 }, "inputs": { "A": { "shape": [1, 2048], "dtype": "float16", "dist": "normal", "seed": 606, "scale": 0.1 }, "B": { "shape": [2048, 512], "dtype": "float16", "dist": "normal", "seed": 607, "scale": 0.1 } }, "outputs": { "Y": { "shape": [1, 512], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 1 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-attn-scores-transB-8x512x64", "preset": "smoke", "attrs": { "alpha": 0.125, "transB": 1 }, "vars": { "M": 512, "K": 64, "N": 512 }, "inputs": { "A": { "shape": [8, 512, 64], "dtype": "float16", "dist": "normal", "seed": 608, "scale": 0.2 }, "B": { "shape": [8, 512, 64], "dtype": "float16", "dist": "normal", "seed": 609, "scale": 0.2 } }, "outputs": { "Y": { "shape": [8, 512, 512], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 8 * 512 * 512 * 64" }] } }, { "name": "fusedmatmul-f16-broadcast-batch-rank4x3-2x8x512x64-tiled", "preset": "smoke", "attrs": { "alpha": 0.125, "transB": 1 }, "vars": { "M": 512, "K": 64, "N": 512 }, "inputs": { "A": { "shape": [2, 8, 512, 64], "dtype": "float16", "dist": "normal", "seed": 610, "scale": 0.2 }, "B": { "shape": [8, 512, 64], "dtype": "float16", "dist": "normal", "seed": 611, "scale": 0.2 } }, "outputs": { "Y": { "shape": [2, 8, 512, 512], "dtype": "float16" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * 2 * 8 * 512 * 512 * 64" }] } }, { "name": "fusedmatmul-f32-decode-gemv-m1-k4096-n4096-pathology", "preset": "stress", "attrs": { "alpha": 1 }, "vars": { "dtype": "float32", "M": 1, "K": 4096, "N": 4096 }, "inputs": { "A": { "shape": [1, 4096], "dtype": "float32", "dist": "normal", "seed": 740, "scale": 0.1 }, "B": { "shape": [4096, 4096], "dtype": "float32", "dist": "normal", "seed": 741, "scale": 0.05 } }, "outputs": { "Y": { "shape": [1, 4096], "dtype": "float32", "dist": "empty" } }, "bench": { "primary": true, "metrics": [ { "type": "bandwidth", "value": "(args.M * args.K + args.K * args.N + args.M * args.N) * dtypeBytes(args.dtype)" } ] } }, { "name": "fusedmatmul-f32-rank4-by-rank2-shared-weight-b2h8-m128-k64-n128-pathology", "preset": "stress", "attrs": { "alpha": 1 }, "vars": { "dtype": "float32", "M": 128, "K": 64, "N": 128 }, "inputs": { "A": { "shape": [2, 8, 128, 64], "dtype": "float32", "dist": "normal", "seed": 742, "scale": 0.2 }, "B": { "shape": [64, 128], "dtype": "float32", "dist": "normal", "seed": 743, "scale": 0.2 } }, "outputs": { "Y": { "shape": [2, 8, 128, 128], "dtype": "float32", "dist": "empty" } }, "bench": { "primary": true, "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.Y) * args.K" }] } }, { "name": "fusedmatmul-f16-rank4-by-rank2-shared-weight-b2h8-m512-k2048-n512-pathology", "preset": "stress", "provenance": { "notes": "Production-scale batched projection with a shared rank-2 weight. This common numpy.matmul broadcast shape is excluded from the subgroup-matrix rank combinations and locks the register-blocked portable fallback that replaced the lower-throughput generic tiled kernel." }, "attrs": { "alpha": 1 }, "vars": { "dtype": "float16", "M": 512, "K": 2048, "N": 512 }, "inputs": { "A": { "shape": [2, 8, 512, 2048], "dtype": "float16", "dist": "normal", "seed": 744, "scale": 0.05 }, "B": { "shape": [2048, 512], "dtype": "float16", "dist": "normal", "seed": 745, "scale": 0.05 } }, "outputs": { "Y": { "shape": [2, 8, 512, 512], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.Y) * args.K" }] } }, { "name": "fusedmatmul-f16-transbatch-a-forces-tiled-8x512x2048x512-stress", "preset": "stress", "attrs": { "alpha": 1, "transBatchA": 1 }, "vars": { "batch": 8, "M": 512, "K": 2048, "N": 512 }, "inputs": { "A": { "shape": [512, 8, 2048], "dtype": "float16", "dist": "normal", "seed": 720, "scale": 0.05 }, "B": { "shape": [8, 2048, 512], "dtype": "float16", "dist": "normal", "seed": 721, "scale": 0.05 } }, "outputs": { "Y": { "shape": [8, 512, 512], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-transbatch-b-8x512x2048x512-pathology", "preset": "stress", "provenance": { "notes": "The operator's valid transBatchB semantic at a production projection size. No subgroup-matrix or specialized trans-batch-B variant accepts this layout, so it selects the lower-throughput generic tiled kernel." }, "attrs": { "alpha": 1, "transBatchB": 1 }, "vars": { "batch": 8, "M": 512, "K": 2048, "N": 512 }, "inputs": { "A": { "shape": [8, 512, 2048], "dtype": "float16", "dist": "normal", "seed": 722, "scale": 0.05 }, "B": { "shape": [2048, 8, 512], "dtype": "float16", "dist": "normal", "seed": 723, "scale": 0.05 } }, "outputs": { "Y": { "shape": [8, 512, 512], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-broadcast-batch-forces-tiled-1x8x512x2048x512-stress", "preset": "stress", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [1, 8, 512, 2048], "dtype": "float16", "dist": "normal", "seed": 730, "scale": 0.05 }, "B": { "shape": [8, 2048, 512], "dtype": "float16", "dist": "normal", "seed": 731, "scale": 0.05 } }, "outputs": { "Y": { "shape": [1, 8, 512, 512], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 512 * 512 * 2048" }] } }, { "name": "fusedmatmul-f16-band-m8-k2560-n4096", "preset": "model", "attrs": { "alpha": 0.5 }, "inputs": { "A": { "shape": [8, 2560], "dtype": "float16", "dist": "normal", "seed": 750, "scale": 0.1 }, "B": { "shape": [2560, 4096], "dtype": "float16", "dist": "normal", "seed": 751, "scale": 0.1 } }, "outputs": { "Y": { "shape": [8, 4096], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 2560 * 4096" }] } }, { "name": "fusedmatmul-f16-band-m16-k2560-n4096", "preset": "model", "attrs": { "alpha": 0.5 }, "inputs": { "A": { "shape": [16, 2560], "dtype": "float16", "dist": "normal", "seed": 752, "scale": 0.1 }, "B": { "shape": [2560, 4096], "dtype": "float16", "dist": "normal", "seed": 753, "scale": 0.1 } }, "outputs": { "Y": { "shape": [16, 4096], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 16 * 2560 * 4096" }] } }, { "name": "fusedmatmul-f16-band-m32-k2560-n4096", "preset": "model", "attrs": { "alpha": 0.5 }, "inputs": { "A": { "shape": [32, 2560], "dtype": "float16", "dist": "normal", "seed": 754, "scale": 0.1 }, "B": { "shape": [2560, 4096], "dtype": "float16", "dist": "normal", "seed": 755, "scale": 0.1 } }, "outputs": { "Y": { "shape": [32, 4096], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 32 * 2560 * 4096" }] } }, { "name": "fusedmatmul-f32-band-m16-k2560-n4096", "preset": "model", "attrs": { "alpha": 0.5 }, "inputs": { "A": { "shape": [16, 2560], "dtype": "float32", "dist": "normal", "seed": 756, "scale": 0.1 }, "B": { "shape": [2560, 4096], "dtype": "float32", "dist": "normal", "seed": 757, "scale": 0.1 } }, "outputs": { "Y": { "shape": [16, 4096], "dtype": "float32", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 16 * 2560 * 4096" }] } }, { "name": "fusedmatmul-f16-narrow-m16-k8192-n256", "preset": "model", "attrs": { "alpha": 1 }, "inputs": { "A": { "shape": [16, 8192], "dtype": "float16", "dist": "normal", "seed": 758, "scale": 0.1 }, "B": { "shape": [8192, 256], "dtype": "float16", "dist": "normal", "seed": 759, "scale": 0.1 } }, "outputs": { "Y": { "shape": [16, 256], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 16 * 8192 * 256" }] } }, { "name": "fusedmatmul-f16-specdec-scores-transB-8xm4-k64-n512", "preset": "model", "attrs": { "alpha": 0.125, "transB": 1 }, "inputs": { "A": { "shape": [8, 4, 64], "dtype": "float16", "dist": "normal", "seed": 760, "scale": 0.1 }, "B": { "shape": [8, 512, 64], "dtype": "float16", "dist": "normal", "seed": 761, "scale": 0.1 } }, "outputs": { "Y": { "shape": [8, 4, 512], "dtype": "float16", "dist": "empty" } }, "bench": { "metrics": [{ "type": "gflops", "value": "2 * 8 * 4 * 64 * 512" }] } } ] }