Download build/webgpu/bench.json from webgpu-kernels/ai.onnx.ReduceSum: direct link, hf CLI and curl.
- Browser
- Download file 12.6 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.ReduceSum/resolve/v1/build/webgpu/bench.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.ReduceSum@v1/build/webgpu/bench.json
-
curl -L -o bench.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.ReduceSum/resolve/v1/build/webgpu/bench.json
12.6 kB
| { | |
| "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] }, | |
| "cases": [ | |
| { | |
| "name": "reduce-sum-axis1-f32-1024x512", | |
| "preset": "smoke", | |
| "vars": { "rows": 1024, "cols": 512 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [1024, 512], "dtype": "float32", "dist": "normal", "seed": 117, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [1024], "dtype": "float32" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reduce-sum-axis0-f32-1024x512", | |
| "preset": "smoke", | |
| "vars": { "rows": 1024, "cols": 512 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [1024, 512], "dtype": "float32", "dist": "normal", "seed": 118, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [512], "dtype": "float32" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-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": "reducesum-lastaxis-f16-4096x4096", | |
| "preset": "smoke", | |
| "vars": { "rows": 4096, "cols": 4096 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [4096, 4096], "dtype": "float16", "dist": "normal", "seed": 117, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [4096], "dtype": "float16" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 2" }] } | |
| }, | |
| { | |
| "name": "rsum-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": 51, "scale": 0.2 } }, | |
| "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": "normal", "seed": 211, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [512], "dtype": "float32" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "axis0-large-f16-65536x512", | |
| "preset": "smoke", | |
| "vars": { "rows": 65536, "cols": 512 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [65536, 512], "dtype": "float16", "dist": "normal", "seed": 211, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [512], "dtype": "float16" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 2" }] } | |
| }, | |
| { | |
| "name": "axis0-tall-16384x1024", | |
| "preset": "smoke", | |
| "vars": { "rows": 16384, "cols": 1024 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [16384, 1024], "dtype": "float32", "dist": "normal", "seed": 212, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [1024], "dtype": "float32" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-lastaxis-f32-4096x4095-unaligned", | |
| "preset": "smoke", | |
| "vars": { "rows": 4096, "cols": 4095 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [4096, 4095], "dtype": "float32", "dist": "normal", "seed": 117, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [4096], "dtype": "float32" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-fullreduce-r3-256x256x256-keepdims", | |
| "preset": "smoke", | |
| "vars": { "rows": 65536, "cols": 256 }, | |
| "attrs": { "keepdims": 1 }, | |
| "inputs": { "x": { "shape": [256, 256, 256], "dtype": "float32", "dist": "normal", "seed": 311, "scale": 0.05 } }, | |
| "outputs": { "y": { "shape": [1, 1, 1], "dtype": "float32" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-1d-16M-to-scalar", | |
| "preset": "smoke", | |
| "vars": { "rows": 16777216, "cols": 1 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [16777216], "dtype": "float32", "dist": "normal", "seed": 312, "scale": 0.01 } }, | |
| "outputs": { "y": { "shape": [], "dtype": "float32" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-1d-16M-to-scalar-f16", | |
| "preset": "smoke", | |
| "vars": { "rows": 16777216, "cols": 1 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [16777216], "dtype": "float16", "dist": "normal", "seed": 312, "scale": 0.01 } }, | |
| "outputs": { "y": { "shape": [], "dtype": "float16" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 2" }] } | |
| }, | |
| { | |
| "name": "reducesum-int32-fullreduce-r3-40x40x40-single-lane", | |
| "preset": "stress", | |
| "vars": { "rows": 64000, "cols": 1 }, | |
| "attrs": { "keepdims": 0 }, | |
| "inputs": { | |
| "x": { "shape": [40, 40, 40], "dtype": "int32", "dist": "randint", "seed": 733, "min": -8, "max": 8 } | |
| }, | |
| "outputs": { "y": { "shape": [], "dtype": "int32", "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-int32-axis0-tall-narrow-32768x8-serial-cols", | |
| "preset": "stress", | |
| "vars": { "rows": 32768, "cols": 8 }, | |
| "attrs": { "axes": [0], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [32768, 8], "dtype": "int32", "dist": "randint", "seed": 811, "min": -8, "max": 8 } }, | |
| "outputs": { "y": { "shape": [8], "dtype": "int32", "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-int32-lastaxis-fewrows-8x32768-serial-per-row", | |
| "preset": "stress", | |
| "vars": { "rows": 8, "cols": 32768 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [8, 32768], "dtype": "int32", "dist": "randint", "seed": 907, "min": -8, "max": 8 } }, | |
| "outputs": { "y": { "shape": [8], "dtype": "int32", "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank3-spatial-axes12-f32-128x256x256-pathology", | |
| "preset": "stress", | |
| "provenance": { | |
| "source": "synthetic", | |
| "notes": "Rank-3 multi-axis f32 reduction with 128 output lanes, each serially scanning a 256x256 plane." | |
| }, | |
| "attrs": { "axes": [1, 2], "keepdims": 1 }, | |
| "inputs": { "x": { "shape": [128, 256, 256], "dtype": "float32", "dist": "normal", "seed": 909, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [128, 1, 1], "dtype": "float32", "dist": "empty" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "128 * 256 * 256 * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank3-spatial-axes12-f16-128x256x256-pathology", | |
| "preset": "stress", | |
| "provenance": { | |
| "source": "synthetic", | |
| "notes": "Rank-3 multi-axis f16 reduction with 128 output lanes, each serially scanning a 256x256 plane." | |
| }, | |
| "attrs": { "axes": [1, 2], "keepdims": 1 }, | |
| "inputs": { "x": { "shape": [128, 256, 256], "dtype": "float16", "dist": "normal", "seed": 909, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [128, 1, 1], "dtype": "float16", "dist": "empty" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "128 * 256 * 256 * 2" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank4-spatial-axes23-f32-2x64x256x256-pathology", | |
| "preset": "stress", | |
| "provenance": { | |
| "source": "synthetic", | |
| "notes": "Rank-4 multi-axis f32 reduction with 128 output lanes, each serially scanning a 256x256 plane." | |
| }, | |
| "attrs": { "axes": [2, 3], "keepdims": 1 }, | |
| "inputs": { "x": { "shape": [2, 64, 256, 256], "dtype": "float32", "dist": "normal", "seed": 910, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [2, 64, 1, 1], "dtype": "float32", "dist": "empty" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "2 * 64 * 256 * 256 * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-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": "normal", "seed": 908, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [15], "dtype": "float32", "dist": "empty" } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank3-axis1-starvation-1x65536x8", | |
| "preset": "smoke", | |
| "vars": { "numel": 524288 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [1, 65536, 8], "dtype": "float32", "dist": "normal", "seed": 118, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [1, 8], "dtype": "float32" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.numel * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank3-axis1-large-8x65536x64", | |
| "preset": "smoke", | |
| "vars": { "numel": 33554432 }, | |
| "attrs": { "axes": [1], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [8, 65536, 64], "dtype": "float32", "dist": "normal", "seed": 118, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [8, 64], "dtype": "float32" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.numel * 4" }] } | |
| }, | |
| { | |
| "name": "reducesum-rank4-axes023-f32-8x256x56x56-noncontiguous-pathology", | |
| "preset": "stress", | |
| "provenance": { | |
| "notes": "Rank-4 reduction over axes {0,2,3} (per-channel statistics over batch and space with the channel axis second): the kept axis sits in the middle, so the reduced elements are not a contiguous suffix and the multi-axis rank-4 kernel launches one serial lane per output, 256 lanes each walking 25088 strided inputs. Its control reduces the same values with the channel axis first." | |
| }, | |
| "vars": { "dtype": "float32", "batch": 8, "channels": 256, "height": 56, "width": 56 }, | |
| "attrs": { "axes": [0, 2, 3], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [8, 256, 56, 56], "dtype": "float32", "dist": "normal", "seed": 930, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [256], "dtype": "float32", "dist": "empty" } }, | |
| "bench": { | |
| "metrics": [ | |
| { | |
| "type": "bandwidth", | |
| "value": "args.batch * args.channels * args.height * args.width * dtypeBytes(args.dtype)" | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "reducesum-rank4-axes123-f32-256x8x56x56-contiguous-suffix-control", | |
| "preset": "stress", | |
| "provenance": { | |
| "notes": "Contiguous-suffix control for the axes {0,2,3} reduction: the same 256 reductions of 25088 elements with the kept axis first, which the cooperative suffix reduction covers with one workgroup per output." | |
| }, | |
| "vars": { "dtype": "float32", "batch": 256, "channels": 8, "height": 56, "width": 56 }, | |
| "attrs": { "axes": [1, 2, 3], "keepdims": 0 }, | |
| "inputs": { "x": { "shape": [256, 8, 56, 56], "dtype": "float32", "dist": "normal", "seed": 931, "scale": 0.2 } }, | |
| "outputs": { "y": { "shape": [256], "dtype": "float32", "dist": "empty" } }, | |
| "bench": { | |
| "metrics": [ | |
| { | |
| "type": "bandwidth", | |
| "value": "args.batch * args.channels * args.height * args.width * dtypeBytes(args.dtype)" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |