Xenova's picture
Xenova HF Staff
sync 2e7068faf55e
f62a28c verified
Raw
History Blame
9.85 kB
{
"op": "ai.onnx.ReduceProd",
"cases": [
{
"name": "reduce-prod-axis0-1024x512",
"preset": "smoke",
"vars": { "dtype": "float32", "rows": 1024, "cols": 512 },
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": { "shape": [1024, 512], "dtype": "float32", "dist": "normal", "seed": 967, "offset": 1, "scale": 0.001 }
},
"outputs": { "y": { "shape": [512], "dtype": "float32" } },
"bench": {
"primary": true,
"metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }]
}
},
{
"name": "rows_1024_cols_32",
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "dtype": "float32", "shape": [1024, 32] } },
"outputs": { "y": { "dtype": "float32", "shape": [1024] } }
},
{
"name": "reduceprod-lastaxis-f32-4096x4096",
"preset": "smoke",
"vars": { "rows": 4096, "cols": 4096 },
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": { "x": { "shape": [4096, 4096], "dtype": "float32", "dist": "normal", "seed": 117, "scale": 0.2 } },
"outputs": { "y": { "shape": [4096], "dtype": "float32" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
},
{
"name": "reduceprod-r3-last-64x64x4096",
"preset": "smoke",
"vars": { "rows": 4096, "cols": 4096 },
"attrs": { "axes": [2], "keepdims": 0 },
"inputs": { "x": { "shape": [64, 64, 4096], "dtype": "float32", "dist": "normal", "seed": 73, "scale": 0.001 } },
"outputs": { "y": { "shape": [64, 64], "dtype": "float32" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
},
{
"name": "axis0-large-65536x512",
"preset": "smoke",
"vars": { "rows": 65536, "cols": 512 },
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": { "shape": [65536, 512], "dtype": "float32", "dist": "uniform", "scale": 0.001, "offset": 1, "seed": 311 }
},
"outputs": { "y": { "shape": [512], "dtype": "float32" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
},
{
"name": "axis0-tall-16384x1024",
"preset": "smoke",
"vars": { "rows": 16384, "cols": 1024 },
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": {
"x": { "shape": [16384, 1024], "dtype": "float32", "dist": "uniform", "scale": 0.001, "offset": 1, "seed": 312 }
},
"outputs": { "y": { "shape": [1024], "dtype": "float32" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
},
{
"name": "reduceprod-lastaxis-scalar-f32-2048x4095",
"preset": "smoke",
"vars": { "dtype": "float32", "rows": 2048, "cols": 4095 },
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": { "shape": [2048, 4095], "dtype": "float32", "dist": "normal", "seed": 419, "scale": 0.001, "offset": 1 }
},
"outputs": { "y": { "shape": [2048], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
},
{
"name": "reduceprod-r3-mid-axis1-64x256x4096",
"preset": "stress",
"provenance": { "notes": "Stress-only capacity case: declared tensors occupy 257 MiB of GPU storage." },
"vars": { "dtype": "float32", "d0": 64, "d1": 256, "d2": 4096 },
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": {
"shape": [64, 256, 4096],
"dtype": "float32",
"dist": "normal",
"seed": 421,
"scale": 0.001,
"offset": 1
}
},
"outputs": { "y": { "shape": [64, 4096], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.d0 * args.d1 * args.d2 * dtypeBytes(args.dtype)" }] }
},
{
"name": "reduceprod-tree-i32-lastaxis-256x4096",
"preset": "smoke",
"vars": { "dtype": "int32", "rows": 256, "cols": 4096 },
"attrs": { "axes": [1], "keepdims": 0 },
"inputs": {
"x": { "shape": [256, 4096], "dtype": "int32", "dist": "uniform", "seed": 423, "scale": 1, "offset": 1 }
},
"outputs": { "y": { "shape": [256], "dtype": "int32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
},
{
"name": "reduceprod-fullreduce-r3-256x256x256-keepdims",
"preset": "smoke",
"vars": { "rows": 65536, "cols": 256 },
"attrs": { "keepdims": 1 },
"inputs": {
"x": {
"shape": [256, 256, 256],
"dtype": "float32",
"dist": "uniform",
"seed": 511,
"scale": 0.001,
"offset": 0.9995
}
},
"outputs": { "y": { "shape": [1, 1, 1], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
},
{
"name": "tree-per-row-cliff-f32-lastaxis-524288x64",
"preset": "stress",
"vars": { "dtype": "float32", "rows": 524288, "cols": 64 },
"attrs": { "axes": [-1], "keepdims": 0 },
"inputs": {
"x": { "shape": [524288, 64], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
},
"outputs": { "y": { "shape": [524288], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] }
},
{
"name": "reduceprod-rowserial-boundary-8192x1024",
"preset": "stress",
"vars": { "dtype": "float32", "rows": 8192, "cols": 1024 },
"attrs": { "axes": [-1], "keepdims": 0 },
"inputs": {
"x": { "shape": [8192, 1024], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
},
"outputs": { "y": { "shape": [8192], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] },
"provenance": {
"notes": "Pins the row-serial selector boundary at rows >= ROW_SERIAL_MIN_ROWS and cols <= ROW_SERIAL_MAX_COLS."
}
},
{
"name": "reduceprod-tree-boundary-4096x1024",
"preset": "stress",
"vars": { "dtype": "float32", "rows": 4096, "cols": 1024 },
"attrs": { "axes": [-1], "keepdims": 0 },
"inputs": {
"x": { "shape": [4096, 1024], "dtype": "float32", "dist": "normal", "seed": 8821, "scale": 0.001, "offset": 1 }
},
"outputs": { "y": { "shape": [4096], "dtype": "float32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * dtypeBytes(args.dtype)" }] },
"provenance": {
"notes": "One row-count notch outside the row-serial region, where the row-per-workgroup tree wins by 1.7x. Pairs with the 8192x1024 case to bracket ROW_SERIAL_MIN_ROWS."
}
},
{
"name": "i32-fullreduce-single-lane-64x64x8-keepdims",
"preset": "stress",
"vars": { "dtype": "int32", "numel": 32768 },
"attrs": { "keepdims": 1 },
"inputs": {
"x": { "shape": [64, 64, 8], "dtype": "int32", "dist": "randint", "seed": 8823, "min": -2, "max": 2 }
},
"outputs": { "y": { "shape": [1, 1, 1], "dtype": "int32" } },
"bench": { "metrics": [{ "type": "bandwidth", "value": "args.numel * dtypeBytes(args.dtype)" }] }
},
{
"name": "reduceprod-rank3-spatial-axes12-f32-128x256x256-pathology",
"preset": "stress",
"provenance": {
"source": "authored for branch coverage",
"notes": "Rank-3 multi-axis reduction with 128 output lanes, each serially scanning a 256x256 plane. Inputs stay close to one so the long product remains finite."
},
"attrs": { "axes": [1, 2], "keepdims": 1 },
"inputs": {
"x": {
"shape": [128, 256, 256],
"dtype": "float32",
"dist": "uniform",
"seed": 909,
"scale": 0.0002,
"offset": 0.9999
}
},
"outputs": { "y": { "shape": [128, 1, 1], "dtype": "float32", "dist": "empty" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "128 * 256 * 256 * 4" }] }
},
{
"name": "reduceprod-rank4-spatial-axes23-f32-2x64x256x256-pathology",
"preset": "stress",
"provenance": {
"source": "authored for branch coverage",
"notes": "Rank-4 multi-axis reduction with 128 output lanes, each serially scanning a 256x256 plane. Inputs stay close to one so the long product remains finite."
},
"attrs": { "axes": [2, 3], "keepdims": 1 },
"inputs": {
"x": {
"shape": [2, 64, 256, 256],
"dtype": "float32",
"dist": "uniform",
"seed": 910,
"scale": 0.0002,
"offset": 0.9999
}
},
"outputs": { "y": { "shape": [2, 64, 1, 1], "dtype": "float32", "dist": "empty" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "2 * 64 * 256 * 256 * 4" }] }
},
{
"name": "reduceprod-axis0-f32-131072x15-narrow-splitk-boundary",
"preset": "stress",
"vars": { "rows": 131072, "cols": 15 },
"attrs": { "axes": [0], "keepdims": 0 },
"inputs": { "x": { "shape": [131072, 15], "dtype": "float32", "dist": "constant", "value": 1 } },
"outputs": { "y": { "shape": [15], "dtype": "float32", "dist": "empty" } },
"bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] }
}
],
"tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] }
}