Download build/webgpu/bench.json from webgpu-kernels/ai.onnx.Slice: direct link, hf CLI and curl.
- Browser
- Download file 9.01 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Slice/resolve/v1/build/webgpu/bench.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.Slice@v1/build/webgpu/bench.json
-
curl -L -o bench.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.Slice/resolve/v1/build/webgpu/bench.json
9.01 kB
| { | |
| "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] }, | |
| "cases": [ | |
| { | |
| "name": "rank3_sequence_window", | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [1, 128, 768] }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 32 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 96 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 64, 768] } } | |
| }, | |
| { | |
| "name": "rank3_end_past_dim", | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [1, 128, 768] }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 120 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 999 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1, 8, 768] } } | |
| }, | |
| { | |
| "name": "slice-rows-aligned-f32-4096x4096", | |
| "preset": "smoke", | |
| "vars": { "outRows": 3584, "cols": 4096 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [4096, 4096], "dist": "normal", "seed": 131, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 256 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 3840 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3584, 4096] } }, | |
| "bench": { "primary": true, "metrics": [{ "type": "bandwidth", "value": "args.outRows * args.cols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-inner-misaligned-f32-4096x4100", | |
| "preset": "smoke", | |
| "vars": { "rows": 4096, "outCols": 4096 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [4096, 4100], "dist": "normal", "seed": 132, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 2 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 4098 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4096, 4096] } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.outCols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-rows-aligned-f16-4096x2048", | |
| "preset": "edge", | |
| "vars": { "outRows": 3072, "cols": 2048, "dtype": "float16" }, | |
| "inputs": { | |
| "data": { "dtype": "float16", "shape": [4096, 2048], "dist": "normal", "seed": 133, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 512 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 3584 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float16", "shape": [3072, 2048] } }, | |
| "bench": { | |
| "metrics": [{ "type": "bandwidth", "value": "args.outRows * args.cols * dtypeBytes(args.dtype) * 2" }] | |
| } | |
| }, | |
| { | |
| "name": "slice-inner-true-misaligned-f32-4096x4097", | |
| "preset": "edge", | |
| "vars": { "rows": 4096, "outCols": 4097 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [8192, 4097], "dist": "normal", "seed": 141, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 2048 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 6144 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4096, 4097] } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.outCols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-no-axes-no-steps-f32-4096x4096", | |
| "preset": "edge", | |
| "vars": { "outRows": 3584, "cols": 4096 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [4096, 4096], "dist": "normal", "seed": 142, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 256 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 3840 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [3584, 4096] } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.outRows * args.cols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-inner-vec4-unaligned-reverse-f32-4096x4096", | |
| "preset": "stress", | |
| "vars": { "rows": 4096, "cols": 4096 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [4096, 4096], "dist": "normal", "seed": 151, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": -1 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": -2147483648 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": -1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [4096, 4096], "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.rows * args.cols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-rows-aligned-f32-2048x2048", | |
| "preset": "smoke", | |
| "vars": { "outRows": 1792, "cols": 2048 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [2048, 2048], "dist": "normal", "seed": 134, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 128 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1920 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [1792, 2048] } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.outRows * args.cols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-middle-axis-f32-24x512x197-vit-tokens-pathology", | |
| "preset": "stress", | |
| "provenance": { | |
| "notes": "Sequence-window slice on the middle axis of a rank-3 tensor whose last extent is the ViT-B/16 token count: the inner_vec4 family needs both data and output last extents % 4 == 0 and rank2_single_axis_x4 serves rank 2 only, so 197 drops the copy to generic_metadata with a per-axis divmod address chain. Batch 24 keeps the sliced output above 1M elements. Control: slice-middle-axis-f32-24x512x200-control." | |
| }, | |
| "vars": { "batch": 24, "outRows": 256, "cols": 197 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [24, 512, 197], "dist": "normal", "seed": 152, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 256 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [24, 256, 197], "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.batch * args.outRows * args.cols * 4 * 2" }] } | |
| }, | |
| { | |
| "name": "slice-middle-axis-f32-24x512x200-control", | |
| "preset": "stress", | |
| "provenance": { | |
| "notes": "The next multiple-of-four last extent above the paired 197-wide case, with about 1.5% more bytes." | |
| }, | |
| "vars": { "batch": 24, "outRows": 256, "cols": 200 }, | |
| "inputs": { | |
| "data": { "dtype": "float32", "shape": [24, 512, 200], "dist": "normal", "seed": 153, "scale": 0.5 }, | |
| "starts": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 0 }, | |
| "ends": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 256 }, | |
| "axes": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 }, | |
| "steps": { "dtype": "int32", "shape": [1], "dist": "constant", "value": 1 } | |
| }, | |
| "outputs": { "output": { "dtype": "float32", "shape": [24, 256, 200], "dist": "empty" } }, | |
| "bench": { "metrics": [{ "type": "bandwidth", "value": "args.batch * args.outRows * args.cols * 4 * 2" }] } | |
| } | |
| ] | |
| } | |