Download build/webgpu/bench.json from webgpu-kernels/ai.onnx.QuantizeLinear: direct link, hf CLI and curl.
- Browser
- Download file 12.7 kB
-
https://huggingface.co/kernels/webgpu-kernels/ai.onnx.QuantizeLinear/resolve/v1/build/webgpu/bench.json
- Command line
-
hf download hf://webgpu-kernels/ai.onnx.QuantizeLinear@v1/build/webgpu/bench.json
-
curl -L -o bench.json https://huggingface.co/kernels/webgpu-kernels/ai.onnx.QuantizeLinear/resolve/v1/build/webgpu/bench.json
12.7 kB
| { | |
| "tunableSpace": { "WORKGROUP_SIZE": [64, 128, 256] }, | |
| "cases": [ | |
| { | |
| "name": "f32_to_u8_1m_scalar", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 1048576 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [1024, 1024], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [1024, 1024] } }, | |
| "bench": { | |
| "primary": true, | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "f32_to_u8_1m_no_zero_point", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 1048576 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [1024, 1024], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [1024, 1024] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "f32_to_i8_1m_plus3_scalar", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "int8", "count": 1048579 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [1048579], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, | |
| "y_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } } | |
| }, | |
| "outputs": { "y": { "dtype": "int8", "shape": [1048579] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "f32_to_u8_1m_plus3_no_zero_point", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 1048579 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [1048579], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [1048579] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "f16_to_u8_1m_scalar", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float16", "outputDtype": "uint8", "count": 1048576 }, | |
| "inputs": { | |
| "x": { "dtype": "float16", "shape": [1024, 1024], "data": { "kind": "constant", "value": 1.25 } }, | |
| "y_scale": { "dtype": "float16", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [1024, 1024] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "blocked_axis1_4096x4096_block32_with_zp", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 16777216 }, | |
| "attrs": { "axis": 1, "block_size": 32 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4096, 4096], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [4096, 128], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [4096, 128], "data": { "kind": "constant", "value": 128 } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4096, 4096] } }, | |
| "bench": { | |
| "primary": true, | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "pertensor_4096x4096_scalar_control_sibling", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 16777216 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4096, 4096], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { "dtype": "float32", "shape": [1], "data": { "kind": "values", "values": [0.02] } }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4096, 4096] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "per_axis0_inner2049_scalar_fallback_alignment_miss", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 1049088 }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [512, 2049], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [512], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [512], "data": { "kind": "constant", "value": 128 } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [512, 2049] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "per_axis0_inner2048_vec4_control_sibling", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 1048576 }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [512, 2048], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [512], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [512], "data": { "kind": "constant", "value": 128 } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [512, 2048] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "f16_per_axis0_inner2048_vec4", | |
| "preset": "smoke", | |
| "vars": { "inputDtype": "float16", "outputDtype": "uint8", "count": 1048576 }, | |
| "attrs": { "axis": 0 }, | |
| "inputs": { | |
| "x": { "dtype": "float16", "shape": [512, 2048], "data": { "kind": "constant", "value": 1.25 } }, | |
| "y_scale": { | |
| "dtype": "float16", | |
| "shape": [512], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [512], "data": { "kind": "constant", "value": 128 } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [512, 2048] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "per_axis1_lastdim_inner1_generic_scalar_cliff", | |
| "preset": "stress", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 4194304 }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2048, 2048], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [2048], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { "dtype": "uint8", "shape": [2048], "data": { "kind": "constant", "value": 128 } } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [2048, 2048] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "per_axis1_lastdim_inner1_generic_scalar_no_zero_point_cliff", | |
| "preset": "stress", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 4194304 }, | |
| "attrs": { "axis": 1 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [2048, 2048], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [2048], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.01, "offset": 0.02 } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [2048, 2048] } }, | |
| "bench": { | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "blocked-rank4-axis1-bs32-no-zp-scalar-pathology", | |
| "preset": "stress", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 4194304 }, | |
| "attrs": { "axis": 1, "block_size": 32 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4, 512, 32, 64], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [4, 16, 32, 64], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.005, "offset": 0.02 } | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4, 512, 32, 64], "dist": "empty" } }, | |
| "bench": { | |
| "primary": true, | |
| "metrics": [ | |
| { "type": "bandwidth", "value": "args.count * (dtypeBytes(args.inputDtype) + dtypeBytes(args.outputDtype))" } | |
| ] | |
| } | |
| }, | |
| { | |
| "name": "blocked-rank4-axis1-bs32-with-zp-scalar-pathology", | |
| "preset": "stress", | |
| "vars": { "inputDtype": "float32", "outputDtype": "uint8", "count": 4194304 }, | |
| "attrs": { "axis": 1, "block_size": 32 }, | |
| "inputs": { | |
| "x": { | |
| "dtype": "float32", | |
| "shape": [4, 512, 32, 64], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.013, "cosStep": 0.017, "scale": 3.0 } | |
| }, | |
| "y_scale": { | |
| "dtype": "float32", | |
| "shape": [4, 16, 32, 64], | |
| "data": { "kind": "fillFloat32", "sinStep": 0.07, "cosStep": 0.05, "scale": 0.005, "offset": 0.02 } | |
| }, | |
| "y_zero_point": { | |
| "dtype": "uint8", | |
| "shape": [4, 16, 32, 64], | |
| "dist": "randint", | |
| "seed": 204, | |
| "min": 96, | |
| "max": 160 | |
| } | |
| }, | |
| "outputs": { "y": { "dtype": "uint8", "shape": [4, 512, 32, 64], "dist": "empty" } }, | |
| "bench": { | |
| "primary": true, | |
| "metrics": [ | |
| { | |
| "type": "bandwidth", | |
| "value": "dtypeBytes(args.inputDtype) * (numel(shapes.x) + numel(shapes.y_scale)) + dtypeBytes(args.outputDtype) * (numel(shapes.y_zero_point) + numel(shapes.y))" | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |