sync 4385228f788d
Browse filesFiles changed (7)
- README.md+19-13
- build/webgpu/bench.json+97-30
- build/webgpu/gather-block-quantized-q4-pair.wgsl.jinja → build/webgpu/gather-block-quantized-packed-byte.wgsl.jinjaRenamed+19-7
- build/webgpu/gather-block-quantized-q8-vec4.wgsl.jinja+4-3
- build/webgpu/manifest.json+1-212
- build/webgpu/metadata.json+1-29
- build/webgpu/test.json+769-2
11 unmodified lines12131415151617181 unmodified line2021222323242526262728297 unmodified lines37383940404142438 unmodified lines52535455565758596055565758596061626364656566676869707172737473747576777879808182838485868788899011 unmodified lines
## Description
Gathers rows from a block-wise quantized weight matrix and dequantizes them. This inference implementation supports the standard `gather_axis = 0`, `quantize_axis = 1` matrix subset with uint8 `data`, 4-bit packed or 8-bit values, rank-1 non-negative in-bounds int64 `indices` projected to uint32 WebGPU storage, and float32 scales/output. Higher-rank gathers, negative indices, int32 indices, int4/uint4 data, 2-bit data, float16/bfloat16 output, and non-default axes are not implemented.Gathers rows from a block-wise quantized weight matrix and dequantizes them. This inference implementation supports the standard `gather_axis = 0`, `quantize_axis = 1` matrix subset with uint8 `data`, 2-bit/4-bit packed or 8-bit values, rank-1 non-negative in-bounds int64 `indices` projected to uint32 WebGPU storage, and float32 scales/output. Higher-rank gathers, negative indices, int32 indices, int4/uint4 data, float16/bfloat16 output, and non-default axes are not implemented.
See the [ONNX Runtime `GatherBlockQuantized` contrib-operator spec](https://github.com/microsoft/onnxruntime/blob/main/docs/ContribOperators.md#com.microsoft.GatherBlockQuantized) for the reference semantics.
1 unmodified line
| Name | Upstream name | Logical dtype | WebGPU storage | Rank | Shape | Description | Presence || --- | --- | --- | --- | --- | --- | --- | --- || `dataT` | `data` | `T1` | runtime-selected; narrow integers and bool use 32-bit slots | `2` | — | Constant uint8 weight matrix. With `bits = 4`, each byte stores two values low-nibble first; with `bits = 8`, each byte stores one value. | required || `dataT` | `data` | `T1` | runtime-selected; narrow integers and bool use 32-bit slots | `2` | — | Constant uint8 weight matrix with a physical byte shape. Each byte stores four 2-bit values, two 4-bit values, or one 8-bit value, low bits first. The logical column count is physical columns times 8/bits; arbitrary partial-byte logical tails require a separate adaptation. GPU storage widens each byte to one u32 word. | required || `indicesT` | `indices` | `Tind` | `uint32` | `1` | — | Non-negative logical int64 indices selecting rows from axis 0 of `data`. Every index must be less than the row count; values use checked uint32 WebGPU storage. | required || `scalesT` | `scales` | `T2` | same as logical dtype | `2` | — | Per-block dequantization scale factors of shape `(rows, ceil(output_columns / block_size))`. | required || `zeroPointsT` | `zero_points` | `T1` | runtime-selected; narrow integers and bool use 32-bit slots | `2` | — | Optional uint8 zero points. At 4 bits two zero points are packed per byte along the quantized axis, low-nibble first; at 8 bits the shape matches `scales`. If absent, uint8 data uses 2^(bits-1). | optional || `zeroPointsT` | `zero_points` | `T1` | runtime-selected; narrow integers and bool use 32-bit slots | `2` | — | Optional uint8 zero points packed along each row of the quantized axis: four per byte at 2 bits, two per byte at 4 bits, or one per byte at 8 bits, low bits first. Every row rounds its byte count independently to ceil(blocks / (8/bits)). Padding bits are ignored. If absent, uint8 data uses 2^(bits-1), including 2 at 2 bits. | optional |
## Outputs
7 unmodified lines
| Attribute | Default | Description || --- | --- | --- || `bits` | `4` | Bits per quantized value. The schema default is 4; this implementation supports 4 or 8. || `bits` | `4` | Bits per quantized value. The schema default is 4; this matrix implementation supports 2, 4 or 8. || `block_size` | `128` | Number of values sharing a scale. Defaults to 128 and must be a power of two at least 16. || `gather_axis` | `0` | Axis from which values are gathered. This matrix implementation supports the standard default, axis 0. || `quantize_axis` | `1` | Axis split into quantization blocks. This matrix implementation supports the standard default, axis 1. |8 unmodified lines
## Files
- [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)- [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)- [`test.json`](build/webgpu/test.json) — correctness cases- [`bench.json`](build/webgpu/bench.json) — benchmark cases- [`gather-block-quantized-q4-pair.wgsl.jinja`](build/webgpu/gather-block-quantized-q4-pair.wgsl.jinja)- [`gather-block-quantized-q8-vec4.wgsl.jinja`](build/webgpu/gather-block-quantized-q8-vec4.wgsl.jinja)- [`metadata.json`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/metadata.json) — kernel metadata (id, file digests, manifest spec, provenance)- [`manifest.json`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/manifest.json) — the op contract (source of truth)- [`test.json`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/test.json) — correctness cases- [`bench.json`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/bench.json) — benchmark cases- [`gather-block-quantized-packed-byte.wgsl.jinja`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/gather-block-quantized-packed-byte.wgsl.jinja)- [`gather-block-quantized-q8-vec4.wgsl.jinja`](https://huggingface.co/kernels/webgpu-kernels/com.microsoft.GatherBlockQuantized/blob/v1/build/webgpu/gather-block-quantized-q8-vec4.wgsl.jinja)
## Use with `@huggingface/kernels`
```shnpm install --save-exact @huggingface/kernels@0.0.1-preview.3npm install --save-exact @huggingface/kernels@0.0.1-preview.4```
Paste the example into a browser app that resolves npm imports. Serve the app over HTTPS or localhost with WebGPU available.
Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
The `version: 1` option selects the published kernel contract; it is independent of any operator opset, contrib `since_version`, or model version.It follows the `v1` branch as fixes land. To pin exact artifact bytes, pass a 40-character commit `revision` instead of `version`.
Replace each `*Data` placeholder with a typed array containing the corresponding input data.
```jsimport { getKernel } from "@huggingface/kernels";
const kernel = await getKernel("webgpu-kernels/com.microsoft.GatherBlockQuantized", { version: 1 });
const dataTData = Uint8Array.from({ length: 32 }, (_, i) => [7, 12, 3, 9, 14, 1, 5, 11][i % 8] ?? 7);const indicesTData = Uint32Array.of(3, 0);const scalesTData = Float32Array.of(0.5, 0.25, 1.5, 2);
const { outputT } = await kernel({ dataT: { data: dataTData, shape: [4, 8] }, indicesT: { data: indicesTData, shape: [2] }, scalesT: { data: scalesTData, shape: [4, 1] },});console.log({ outputT });```172 unmodified lines17317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220317617717817920818018118218324 unmodified lines208209210239211212213214137 unmodified lines352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452172 unmodified lines ] } }, { "name": "gather-block-q8-alignment-control-cols1024-vec4", "preset": "smoke", "vars": { "rows": 4096, "cols": 1024, "indexCount": 1024, "bits": 8, "blockSize": 32 }, "attrs": { "bits": 8, "block_size": 32 }, "inputs": { "dataT": { "shape": [4096, 1024], "dtype": "uint8", "dist": "randint", "seed": 215, "min": 0, "max": 255 }, "indicesT": { "shape": [1024], "dtype": "uint32", "dist": "linearMod", "seed": 215, "step": 37, "mod": 4096 }, "scalesT": { "shape": [4096, 32], "dtype": "float32", "dist": "uniform", "seed": 216, "offset": 0.04, "scale": 0.01, "signed": false } }, "outputs": { "outputT": { "shape": [1024, 1024], "dtype": "float32" } }, "bench": { "metrics": [ { "type": "bandwidth", "value": "args.indexCount * (args.cols * args.bits / 8 + dim(shapes.scalesT, 1) * 4 + args.cols * 4 + 4)" } ] } }, { "name": "gather-block-q8-dispatch-cliff-vocab-idx8192-cols4096-2dfold", "preset": "stress", "provenance": { "notes": "Stress-only dispatch/capacity case: widened uint8 GPU storage brings the declared footprint to 392 MiB." "notes": "Large-table stress case: a table of 16384 rows by 4096 columns with 8192 gathered indices and a declared footprint of 392 MiB." }, "vars": { "rows": 16384, "cols": 4096, "indexCount": 8192, "bits": 8, "blockSize": 32 }, "attrs": { "bits": 8, "block_size": 32 },24 unmodified lines "name": "gather-block-q8-dispatch-control-idx1024-cols4096-1d", "preset": "stress", "provenance": { "notes": "Widened uint8 GPU storage gives this capacity stress case a declared footprint of 280 MiB." "notes": "Large-table stress case: a table of 16384 rows by 4096 columns with 1024 gathered indices and a declared footprint of 280 MiB." }, "vars": { "rows": 16384, "cols": 4096, "indexCount": 1024, "bits": 8, "blockSize": 32 }, "attrs": { "bits": 8, "block_size": 32 },137 unmodified lines } ] } }, { "name": "gather-block-q2-512x128-idx512", "preset": "smoke", "provenance": { "notes": "2-bit matrix gather. Bandwidth counts the widened uint8 GPU storage, including independently rounded zero-point rows." }, "vars": { "rows": 512, "cols": 128, "indexCount": 512, "bits": 2, "blockSize": 32 }, "attrs": { "bits": 2, "block_size": 32 }, "inputs": { "dataT": { "shape": [512, 32], "dtype": "uint8", "dist": "randint", "seed": 7100, "min": 0, "max": 255 }, "indicesT": { "shape": [512], "dtype": "uint32", "dist": "linearMod", "seed": 7101, "step": 17, "mod": 512 }, "scalesT": { "shape": [512, 4], "dtype": "float32", "dist": "uniform", "seed": 7102, "offset": 0.04, "scale": 0.01, "signed": false } }, "outputs": { "outputT": { "shape": [512, 128], "dtype": "float32" } }, "bench": { "metrics": [ { "type": "bandwidth", "value": "args.indexCount * (args.cols * args.bits / 8 * 4 + dim(shapes.scalesT, 1) * 4 + args.cols * 4 + 4)" } ] } }, { "name": "gather-block-q2-zero-512x128-idx512", "preset": "smoke", "provenance": { "notes": "2-bit matrix gather. Bandwidth counts the widened uint8 GPU storage, including independently rounded zero-point rows." }, "vars": { "rows": 512, "cols": 128, "indexCount": 512, "bits": 2, "blockSize": 32 }, "attrs": { "bits": 2, "block_size": 32 }, "inputs": { "dataT": { "shape": [512, 32], "dtype": "uint8", "dist": "randint", "seed": 7100, "min": 0, "max": 255 }, "indicesT": { "shape": [512], "dtype": "uint32", "dist": "linearMod", "seed": 7101, "step": 17, "mod": 512 }, "scalesT": { "shape": [512, 4], "dtype": "float32", "dist": "uniform", "seed": 7102, "offset": 0.04, "scale": 0.01, "signed": false }, "zeroPointsT": { "shape": [512, 1], "dtype": "uint8", "dist": "randint", "seed": 7103, "min": 0, "max": 255 } }, "outputs": { "outputT": { "shape": [512, 128], "dtype": "float32" } }, "bench": { "metrics": [ { "type": "bandwidth", "value": "args.indexCount * (args.cols * args.bits / 8 * 4 + dim(shapes.scalesT, 1) * 4 + args.cols * 4 + 4 + dim(shapes.zeroPointsT, 1) * 4)" } ] } }, { "name": "gather-block-q2-zero-512x36-idx512", "preset": "smoke", "provenance": { "notes": "2-bit matrix gather. Bandwidth counts the widened uint8 GPU storage, including independently rounded zero-point rows." }, "vars": { "rows": 512, "cols": 36, "indexCount": 512, "bits": 2, "blockSize": 16 }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "shape": [512, 9], "dtype": "uint8", "dist": "randint", "seed": 7100, "min": 0, "max": 255 }, "indicesT": { "shape": [512], "dtype": "uint32", "dist": "linearMod", "seed": 7101, "step": 17, "mod": 512 }, "scalesT": { "shape": [512, 3], "dtype": "float32", "dist": "uniform", "seed": 7102, "offset": 0.04, "scale": 0.01, "signed": false }, "zeroPointsT": { "shape": [512, 1], "dtype": "uint8", "dist": "randint", "seed": 7103, "min": 0, "max": 255 } }, "outputs": { "outputT": { "shape": [512, 36], "dtype": "float32" } }, "bench": { "metrics": [ { "type": "bandwidth", "value": "args.indexCount * (args.cols * args.bits / 8 * 4 + dim(shapes.scalesT, 1) * 4 + args.cols * 4 + 4 + dim(shapes.zeroPointsT, 1) * 4)" } ] } } ]}1123455678913 unmodified lines232425252627282929303031323334353637383935364041424344454647484950{% macro flat_index_2d(workgroupSize, name="i", bound="params.count", guardInline=false) %}{% macro flat_index_2d(workgroupSize, name="i", bound="params.count") %}{% set wgTerm = workgroupSize ~ "u" if workgroupSize is number else workgroupSize %} // 2D-folded flat index: gid.y carries the high bits past the dispatch's // per-axis workgroup fold width. let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};{% endmacro %} let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};{% endmacro %}{{ env.wgsl.resourceDeclarations }}
const WG: u32 = {{ workgroupSize }}u;13 unmodified lines return; } let packed = data[data_row * params.packedCols + packed_col]; let col0 = packed_col * 2u; let col0 = packed_col * {{ 8 // bits }}u; let block = col0 / params.blockSize; let scale = scales[data_row * params.blocks + block];{% if hasZero %} let packed_zero = zero_points[data_row * params.zeroPointCols + block / 2u]; let zero = f32((packed_zero >> ((block % 2u) * 4u)) & 15u); let packed_zero = zero_points[data_row * params.zeroPointCols + block / {{ 8 // bits }}u]; let zero = f32((packed_zero >> ((block % {{ 8 // bits }}u) * {{ bits }}u)) & {{ 2 ** bits - 1 }}u);{% else %}{% if bits == 2 %} // uint8 data with bits=2 defaults to zero point 2^(bits-1) = 2. let zero = 2.0;{% else %} // uint8 data with bits=4 defaults to zero point 2^(bits-1) = 8. let zero = 8.0;{% endif %} let q0 = f32(packed & 15u); let q1 = f32((packed >> 4u) & 15u);{% endif %} let q0 = f32(packed & {{ 2 ** bits - 1 }}u); let q1 = f32((packed >> {{ bits }}u) & {{ 2 ** bits - 1 }}u);{% if bits == 2 %} let q2 = f32((packed >> 4u) & 3u); let q3 = f32((packed >> 6u) & 3u); output[pair_index] = vec4<f32>((q0 - zero) * scale, (q1 - zero) * scale, (q2 - zero) * scale, (q3 - zero) * scale);{% else %} output[pair_index] = vec2<f32>((q0 - zero) * scale, (q1 - zero) * scale);{% endif %}}1123455678940 unmodified lines5051525253545556{% macro flat_index_2d(workgroupSize, name="i", bound="params.count", guardInline=false) %}{% macro flat_index_2d(workgroupSize, name="i", bound="params.count") %}{% set wgTerm = workgroupSize ~ "u" if workgroupSize is number else workgroupSize %} // 2D-folded flat index: gid.y carries the high bits past the dispatch's // per-axis workgroup fold width. let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};{% endmacro %} let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};{% endmacro %}{{ env.wgsl.resourceDeclarations }}
const WG: u32 = {{ workgroupSize }}u;40 unmodified lines let block = col0 / params.blockSize; let scale = scales[data_row * params.blocks + block]; let q = data[data_row * row_vecs + vec_col] & vec4<u32>(255u); // blockSize % 4 == 0 (gated) guarantees the 4 packed columns share one block, // blockSize % 4 == 0 (required) guarantees the 4 packed columns share one block, // so one scale and one zero point apply to the whole vec4.{% if hasZero %} let zero = f32(zero_points[data_row * params.blocks + block]);1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112121{ "domain": "com.microsoft", "name": "GatherBlockQuantized", "sinceVersion": 1, "inputs": { "dataT": { "onnx": "data", "dtype": "T1", "rank": 2 }, "indicesT": { "onnx": "indices", "dtype": "Tind", "rank": 1, "storage": "uint32", "narrowing": "checked" }, "scalesT": { "onnx": "scales", "dtype": "T2", "rank": 2 }, "zeroPointsT": { "onnx": "zero_points", "dtype": "T1", "rank": 2, "optional": true } }, "outputs": { "outputT": { "onnx": "output", "dtype": "T2", "rank": 2, "shape": "[dim(shapes.indicesT, 0), dim(shapes.dataT, 1) * (8 / attrs.bits)]" } }, "attributes": { "bits": { "default": 4 }, "block_size": { "default": 128 }, "gather_axis": { "default": 0 }, "quantize_axis": { "default": 1 } }, "attributeConstraints": { "bits": { "values": [4, 8] }, "gather_axis": { "values": [0] }, "quantize_axis": { "values": [1] } }, "typeConstraints": { "T1": ["uint8"], "T2": ["float32"], "Tind": ["int64"] }, "tunables": { "WORKGROUP_SIZE": { "default": 64 } }, "derive": { "deviceWorkgroupCap": "min(device.limits.maxComputeInvocationsPerWorkgroup, device.limits.maxComputeWorkgroupSizeX)", "bits": "attrs.bits", "blockSize": "attrs.block_size", "blockSizeOk": "blockSize >= 16 and pow2ceil(blockSize) == blockSize", "outBlocks": "ceilDiv(dim(shapes.outputT, 1), blockSize)", "zeroPointCols": "ceilDiv(outBlocks, 2) if bits == 4 else outBlocks", "workgroupSize": "min(tunables.WORKGROUP_SIZE, deviceWorkgroupCap)", "commonShapeValid": "blockSizeOk and ranks.dataT == 2 and ranks.indicesT == 1 and ranks.scalesT == 2 and ranks.outputT == 2 and tensorDtypes.indicesT == \"uint32\" and tensorDtypes.scalesT == \"float32\" and tensorDtypes.outputT == \"float32\" and dim(shapes.outputT, 0) == dim(shapes.indicesT, 0) and dim(shapes.scalesT, 0) == dim(shapes.dataT, 0) and dim(shapes.scalesT, 1) == outBlocks", "q4ShapeValid": "commonShapeValid and tensorDtypes.dataT == \"uint8\" and dim(shapes.outputT, 1) == dim(shapes.dataT, 1) * 2", "q8ShapeValid": "commonShapeValid and tensorDtypes.dataT == \"uint8\" and dim(shapes.outputT, 1) == dim(shapes.dataT, 1)", "zeroPointsValid": "present.zeroPointsT and ranks.zeroPointsT == 2 and tensorDtypes.zeroPointsT == \"uint8\" and dim(shapes.zeroPointsT, 0) == dim(shapes.dataT, 0) and dim(shapes.zeroPointsT, 1) == zeroPointCols", "noZeroMode": "not present.zeroPointsT", "zeroMode": "zeroPointsValid", "hasZero": "zeroMode", "indexScalar": "\"u32\"", "scaleScalar": "\"f32\"", "zeroPointElement": "\"u32\"", "workgroupFits": "workgroupSize > 0", "foldedDispatchFits": "ceil(ceil(numel(shapes.outputT) / min(device.limits.maxComputeWorkgroupsPerDimension, 65535)) / workgroupSize) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)" }, "when": ["foldedDispatchFits", "workgroupFits"], "bindings": { "data": { "arg": "dataT", "elementType": "$dataElement" }, "indices": { "arg": "indicesT", "elementType": "$indexScalar" }, "scales": { "arg": "scalesT", "elementType": "$scaleScalar" }, "output": { "arg": "outputT", "elementType": "$outputElement" }, "params": { "struct": [ { "name": "indexCount", "type": "u32", "value": "dim(shapes.indicesT, 0)" }, { "name": "cols", "type": "u32", "value": "dim(shapes.outputT, 1)" }, { "name": "blocks", "type": "u32", "value": "dim(shapes.scalesT, 1)" }, { "name": "blockSize", "type": "u32", "value": "blockSize" }, { "name": "rows", "type": "u32", "value": "dim(shapes.dataT, 0)" } ] }, "params_main": { "name": "params", "struct": [ { "name": "indexCount", "type": "u32", "value": "dim(shapes.indicesT, 0)" }, { "name": "packedCols", "type": "u32", "value": "dim(shapes.dataT, 1)" }, { "name": "blocks", "type": "u32", "value": "dim(shapes.scalesT, 1)" }, { "name": "blockSize", "type": "u32", "value": "blockSize" }, { "name": "rows", "type": "u32", "value": "dim(shapes.dataT, 0)" } ] }, "zero_points": { "arg": "zeroPointsT", "elementType": "$zeroPointElement" }, "params__uniform": { "name": "params", "struct": [ { "name": "indexCount", "type": "u32", "value": "dim(shapes.indicesT, 0)" }, { "name": "packedCols", "type": "u32", "value": "dim(shapes.dataT, 1)" }, { "name": "blocks", "type": "u32", "value": "dim(shapes.scalesT, 1)" }, { "name": "zeroPointCols", "type": "u32", "value": "zeroPointCols" }, { "name": "blockSize", "type": "u32", "value": "blockSize" }, { "name": "rows", "type": "u32", "value": "dim(shapes.dataT, 0)" } ] }, "params_q8_zero_tail4": { "name": "params", "struct": [ { "name": "indexCount", "type": "u32", "value": "dim(shapes.indicesT, 0)" }, { "name": "cols", "type": "u32", "value": "dim(shapes.outputT, 1)" }, { "name": "packedCols", "type": "u32", "value": "dim(shapes.dataT, 1)" }, { "name": "blocks", "type": "u32", "value": "dim(shapes.scalesT, 1)" }, { "name": "blockSize", "type": "u32", "value": "blockSize" }, { "name": "rows", "type": "u32", "value": "dim(shapes.dataT, 0)" } ] } }, "variants": [ { "id": "q8_no_zero_vec4", "priority": 10, "when": ["q8ShapeValid", "noZeroMode", "bits == 8", "blockSize % 4 == 0", "dim(shapes.outputT, 1) % 4 == 0"], "derive": { "scalarTail": false, "dataElement": "\"vec4<u32>\"", "outputElement": "\"vec4<f32>\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q8-vec4.wgsl.jinja", "bindings": ["data", "indices", "scales", "output", "params"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)", "z": 1 } } ] }, { "id": "q8_zero_vec4", "priority": 10, "when": ["q8ShapeValid", "zeroMode", "bits == 8", "blockSize % 4 == 0", "dim(shapes.outputT, 1) % 4 == 0"], "derive": { "scalarTail": false, "dataElement": "\"vec4<u32>\"", "outputElement": "\"vec4<f32>\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q8-vec4.wgsl.jinja", "bindings": ["data", "indices", "scales", "zero_points", "output", "params"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)", "z": 1 } } ] }, { "id": "q4_no_zero_pair", "priority": 10, "when": ["q4ShapeValid", "noZeroMode", "bits == 4"], "derive": { "dataElement": "\"u32\"", "outputElement": "\"vec2<f32>\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q4-pair.wgsl.jinja", "bindings": ["data", "indices", "scales", "output", "params_main"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)", "z": 1 } } ] }, { "id": "q4_zero_pair", "priority": 10, "when": ["q4ShapeValid", "zeroMode", "bits == 4"], "derive": { "dataElement": "\"u32\"", "outputElement": "\"vec2<f32>\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q4-pair.wgsl.jinja", "bindings": ["data", "indices", "scales", "zero_points", "output", "params__uniform"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)", "z": 1 } } ] }, { "id": "q8_no_zero_tail4", "priority": 5, "when": ["q8ShapeValid", "noZeroMode", "bits == 8"], "derive": { "scalarTail": true, "dataElement": "\"u32\"", "outputElement": "\"f32\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q8-vec4.wgsl.jinja", "bindings": ["data", "indices", "scales", "output", "params_q8_zero_tail4"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)", "z": 1 } } ] }, { "id": "q8_zero_tail4", "priority": 5, "when": ["q8ShapeValid", "zeroMode", "bits == 8"], "derive": { "scalarTail": true, "dataElement": "\"u32\"", "outputElement": "\"f32\"" }, "passes": [ { "id": "main", "shader": "gather-block-quantized-q8-vec4.wgsl.jinja", "bindings": ["data", "indices", "scales", "zero_points", "output", "params_q8_zero_tail4"], "dispatch": { "x": "min(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)", "y": "ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)", "z": 1 } } ] } ]}{"domain":"com.microsoft","name":"GatherBlockQuantized","sinceVersion":1,"inputs":{"dataT":{"onnx":"data","dtype":"T1","rank":2},"indicesT":{"onnx":"indices","dtype":"Tind","rank":1,"storage":"uint32","narrowing":"checked"},"scalesT":{"onnx":"scales","dtype":"T2","rank":2},"zeroPointsT":{"onnx":"zero_points","dtype":"T1","rank":2,"optional":true}},"outputs":{"outputT":{"onnx":"output","dtype":"T2","rank":2,"shape":"[dim(shapes.indicesT, 0), dim(shapes.dataT, 1) * (8 / attrs.bits)]"}},"attributes":{"bits":{"default":4},"block_size":{"default":128},"gather_axis":{"default":0},"quantize_axis":{"default":1}},"attributeConstraints":{"bits":{"values":[2,4,8]},"gather_axis":{"values":[0]},"quantize_axis":{"values":[1]}},"typeConstraints":{"T1":["uint8"],"T2":["float32"],"Tind":["int64"]},"tunables":{"WORKGROUP_SIZE":{"default":64}},"derive":{"deviceWorkgroupCap":"min(device.limits.maxComputeInvocationsPerWorkgroup, device.limits.maxComputeWorkgroupSizeX)","bits":"attrs.bits","blockSize":"attrs.block_size","blockSizeOk":"blockSize >= 16 and pow2ceil(blockSize) == blockSize","outBlocks":"ceilDiv(dim(shapes.outputT, 1), blockSize)","zeroPointCols":"ceilDiv(outBlocks, 8 / bits)","workgroupSize":"min(tunables.WORKGROUP_SIZE, deviceWorkgroupCap)","commonShapeValid":"blockSizeOk and ranks.dataT == 2 and ranks.indicesT == 1 and ranks.scalesT == 2 and ranks.outputT == 2 and dim(shapes.outputT, 0) == dim(shapes.indicesT, 0) and dim(shapes.scalesT, 0) == dim(shapes.dataT, 0) and dim(shapes.scalesT, 1) == outBlocks","q4ShapeValid":"commonShapeValid and dim(shapes.outputT, 1) == dim(shapes.dataT, 1) * 2","q8ShapeValid":"commonShapeValid and dim(shapes.outputT, 1) == dim(shapes.dataT, 1)","hasZero":"present.zeroPointsT","zeroPointsValid":"not hasZero or (ranks.zeroPointsT == 2 and dim(shapes.zeroPointsT, 0) == dim(shapes.dataT, 0) and dim(shapes.zeroPointsT, 1) == zeroPointCols)","indexScalar":"\"u32\"","scaleScalar":"\"f32\"","zeroPointElement":"\"u32\"","workgroupFits":"workgroupSize > 0","foldedDispatchFits":"ceil(ceil((numel(shapes.outputT) / (4 if bits == 2 else 1)) / min(device.limits.maxComputeWorkgroupsPerDimension, 65535)) / workgroupSize) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)","q2ShapeValid":"commonShapeValid and dim(shapes.outputT, 1) == dim(shapes.dataT, 1) * 4"},"when":["foldedDispatchFits","workgroupFits","zeroPointsValid"],"bindings":{"data":{"arg":"dataT","elementType":"$dataElement"},"indices":{"arg":"indicesT","elementType":"$indexScalar"},"scales":{"arg":"scalesT","elementType":"$scaleScalar"},"output":{"arg":"outputT","elementType":"$outputElement"},"params":{"struct":[{"name":"indexCount","type":"u32","value":"dim(shapes.indicesT, 0)"},{"name":"cols","type":"u32","value":"dim(shapes.outputT, 1)"},{"name":"blocks","type":"u32","value":"dim(shapes.scalesT, 1)"},{"name":"blockSize","type":"u32","value":"blockSize"},{"name":"rows","type":"u32","value":"dim(shapes.dataT, 0)"}]},"params_main":{"name":"params","when":"not hasZero","struct":[{"name":"indexCount","type":"u32","value":"dim(shapes.indicesT, 0)"},{"name":"packedCols","type":"u32","value":"dim(shapes.dataT, 1)"},{"name":"blocks","type":"u32","value":"dim(shapes.scalesT, 1)"},{"name":"blockSize","type":"u32","value":"blockSize"},{"name":"rows","type":"u32","value":"dim(shapes.dataT, 0)"}]},"zero_points":{"arg":"zeroPointsT","elementType":"$zeroPointElement","when":"hasZero"},"params__uniform":{"name":"params","when":"hasZero","struct":[{"name":"indexCount","type":"u32","value":"dim(shapes.indicesT, 0)"},{"name":"packedCols","type":"u32","value":"dim(shapes.dataT, 1)"},{"name":"blocks","type":"u32","value":"dim(shapes.scalesT, 1)"},{"name":"zeroPointCols","type":"u32","value":"zeroPointCols"},{"name":"blockSize","type":"u32","value":"blockSize"},{"name":"rows","type":"u32","value":"dim(shapes.dataT, 0)"}]},"params_q8_zero_tail4":{"name":"params","struct":[{"name":"indexCount","type":"u32","value":"dim(shapes.indicesT, 0)"},{"name":"cols","type":"u32","value":"dim(shapes.outputT, 1)"},{"name":"packedCols","type":"u32","value":"dim(shapes.dataT, 1)"},{"name":"blocks","type":"u32","value":"dim(shapes.scalesT, 1)"},{"name":"blockSize","type":"u32","value":"blockSize"},{"name":"rows","type":"u32","value":"dim(shapes.dataT, 0)"}]}},"variants":[{"id":"packed_byte","priority":10,"when":["(bits == 2 and q2ShapeValid) or (bits == 4 and q4ShapeValid)"],"derive":{"dataElement":"\"u32\"","outputElement":"\"vec4<f32>\" if bits == 2 else \"vec2<f32>\""},"passes":[{"id":"main","shader":"gather-block-quantized-packed-byte.wgsl.jinja","bindings":["data","indices","scales","zero_points","output","params_main","params__uniform"],"dispatch":{"x":"min(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)","y":"ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * dim(shapes.dataT, 1)), (workgroupSize)), 65535)","z":1}}]},{"id":"q8_vec4","priority":10,"when":["q8ShapeValid","bits == 8","blockSize % 4 == 0","dim(shapes.outputT, 1) % 4 == 0"],"derive":{"scalarTail":false,"dataElement":"\"vec4<u32>\"","outputElement":"\"vec4<f32>\""},"passes":[{"id":"main","shader":"gather-block-quantized-q8-vec4.wgsl.jinja","bindings":["data","indices","scales","zero_points","output","params"],"dispatch":{"x":"min(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)","y":"ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * (dim(shapes.outputT, 1) / 4)), (workgroupSize)), 65535)","z":1}}]},{"id":"q8_tail4","priority":5,"when":["q8ShapeValid","bits == 8"],"derive":{"scalarTail":true,"dataElement":"\"u32\"","outputElement":"\"f32\""},"passes":[{"id":"main","shader":"gather-block-quantized-q8-vec4.wgsl.jinja","bindings":["data","indices","scales","zero_points","output","params_q8_zero_tail4"],"dispatch":{"x":"min(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)","y":"ceilDiv(ceilDiv((dim(shapes.indicesT, 0) * ceilDiv(dim(shapes.outputT, 1), 4)), (workgroupSize)), 65535)","z":1}}]}]}12345678910111213141516171819202122232425262728291{ "name": "com.microsoft.GatherBlockQuantized", "id": "_com_microsoft_gatherblockquantized_webgpu_7698e56", "version": 1, "license": "Apache-2.0", "backend": { "type": "webgpu" }, "digest": { "algorithm": "sha256", "files": { "bench.json": "jKDPiApwDuwewTrNn1DOYD7gMVHY+vME4qUAe2kUbsw=", "gather-block-quantized-q4-pair.wgsl.jinja": "szEkOKfzt9XFHiIsEiQY0g5efbe36fXYBCE3v4SVo6s=", "gather-block-quantized-q8-vec4.wgsl.jinja": "akD5Z/+o9Q/HRnbH8yPrD8Y6Pd0SWPgiDRwgHEqt/YQ=", "manifest.json": "1/OD0zneUAu2ddg/neSEu+dpmmWqZiMNA9AVO6AI1W8=", "test.json": "+2tkFsiI9bP4xaQI+hw2wX3CbMkCEqUzgTHYrTAL6bg=" } }, "provenance": { "kernel": { "sha": "6fdf6301e2bbcc2f03bf1eaf493b7ad55ef33afc", "dirty": false } }, "webgpu": { "manifestSpec": "2.1", "variants": { "q8_no_zero_vec4": ["gather-block-quantized-q8-vec4.wgsl.jinja"], "q8_zero_vec4": ["gather-block-quantized-q8-vec4.wgsl.jinja"], "q4_no_zero_pair": ["gather-block-quantized-q4-pair.wgsl.jinja"], "q4_zero_pair": ["gather-block-quantized-q4-pair.wgsl.jinja"], "q8_no_zero_tail4": ["gather-block-quantized-q8-vec4.wgsl.jinja"], "q8_zero_tail4": ["gather-block-quantized-q8-vec4.wgsl.jinja"] } }}{"name":"com.microsoft.GatherBlockQuantized","id":"_com_microsoft_gatherblockquantized_webgpu_53d5f6e","version":1,"license":"Apache-2.0","backend":{"type":"webgpu"},"digest":{"algorithm":"sha256","files":{"bench.json":"jNcVtwRGTnkOMtuWBuoG2I772kbUnkRWVpi6G1/slWQ=","gather-block-quantized-packed-byte.wgsl.jinja":"zttJt4638UqGV54G5nBmWzUjYBt3fjRQHzKM02n3Dt8=","gather-block-quantized-q8-vec4.wgsl.jinja":"JmUTIJQPP56IQKbH+cUybrJawpBoq49PwjZ9N14AZCw=","manifest.json":"cca3lEfFeziNNDhiZUWna+uAGJK14QGM9fThQNuYLp0=","test.json":"ftFZqQQuxdu9u6F4F/7fjnNu0wCFFObW7UeJfdyOIOs="}},"provenance":{"kernel":{"sha":"4385228f788ddaa1bd7aec6a80a20f3ddffd8011","dirty":false}},"webgpu":{"manifestSpec":"2.2"}}12344567891011263 unmodified lines27527627727427827928028115 unmodified lines297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065{ "fixtureArrays": { "ort_q8_no_zero_input_dataT": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63], "q8_no_zero_multiblock_vec4_cols32_input_dataT": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127] "q8_no_zero_multiblock_vec4_cols32_input_dataT": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127], "two_bit_q2_multiblock_no_zero_input_dataT": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147], "two_bit_q2_zero_3_blocks_partial_input_dataT": [228, 36, 57, 73, 78, 146, 147, 228, 36, 147, 211, 228, 52, 57, 77, 78, 147, 211, 78, 142, 147, 227, 228, 56, 57, 78, 142], "two_bit_q2_zero_7_blocks_aligned_input_scalesT": [0.25, -0.5, 1, 2, 0.25, -0.5, 1, -0.5, 1, 2, 0.25, -0.5, 1, 2, 1, 2, 0.25, -0.5, 1, 2, 0.25], "two_bit_q2_zero_8_blocks_aligned_input_scalesT": [0.25, -0.5, 1, 2, 0.25, -0.5, 1, 2, -0.5, 1, 2, 0.25, -0.5, 1, 2, 0.25, 1, 2, 0.25, -0.5, 1, 2, 0.25, -0.5] }, "cases": [ {263 unmodified lines { "name": "q8_zero_points_tail_cols18", "provenance": { "notes": "Explicit q8 zero points with 18 output columns exercise the scalar tail after four complete vec4 groups; the final quantization block is partial and uses its own scale and zero point." "notes": "Explicit q8 zero points with 18 output columns (not a multiple of four); the final quantization block is partial and uses its own scale and zero point." }, "attrs": { "bits": 8, "block_size": 16 }, "inputs": {15 unmodified lines } }, "outputs": { "outputT": { "dtype": "float32", "shape": [3, 18], "tolerance": 0.000001 } } }, { "name": "two_bit_ort_q2_midpoint_matrix_projection", "provenance": { "source": "onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc", "test": "WebGpu_GatherAxis0NoZeroPoints_2Bits_Uint8", "notes": "Matrix projection of the upstream rank-3 fixture: flatten six rows and gather rows 3/4/5 instead of outer index 1; preserves its exact 48 outputs. Indices are uint32." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [6, 4], "data": { "kind": "values", "values": [228, 228, 228, 228, 27, 27, 27, 27, 78, 78, 78, 78, 177, 177, 177, 177, 255, 255, 255, 255, 0, 0, 0, 0] } }, "indicesT": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [3, 4, 5] } }, "scalesT": { "dtype": "float32", "shape": [6, 1], "data": { "kind": "values", "values": [1.0, 2.0, 1.0, 2.0, 1.0, 2.0] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [3, 16], "data": { "kind": "values", "values": [-2.0, -4.0, 2.0, 0.0, -2.0, -4.0, 2.0, 0.0, -2.0, -4.0, 2.0, 0.0, -2.0, -4.0, 2.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0, -4.0] }, "tolerance": 0 } } }, { "name": "two_bit_ort_q2_zero_rows_five_blocks", "provenance": { "source": "onnxruntime/test/contrib_ops/gather_block_quantized_op_test.cc", "test": "WebGpu_GatherAxis0WithZeroPoints_2Bits_Uint8_PackedZpNotMultipleOf4", "notes": "Exact upstream matrix packed data/zero points and outputs; each five-block zero-point row takes two bytes." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [2, 20], "data": { "kind": "constant", "value": 170 } }, "indicesT": { "dtype": "uint32", "shape": [1], "data": { "kind": "values", "values": [1] } }, "scalesT": { "dtype": "float32", "shape": [2, 5], "data": { "kind": "values", "values": [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [2, 2], "data": { "kind": "values", "values": [108, 3, 27, 2] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [1, 80], "data": { "kind": "values", "values": [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] }, "tolerance": 0 } } }, { "name": "two_bit_q2_lane_order_no_zero", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [228, 36, 147, 211, 78, 142] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [0.25, -0.5, 1.0] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 8], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.5, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.5, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0] } } } }, { "name": "two_bit_q2_default_block_size_no_zero", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 5], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 147, 211, 228, 52, 57, 78, 142, 147, 227, 228] } }, "indicesT": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [2, 0, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [0.25, -0.5, 1.0] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [3, 20], "tolerance": 0, "data": { "kind": "cycle", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25] } } } }, { "name": "two_bit_q2_multiblock_no_zero", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 32 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 17], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_multiblock_no_zero_input_dataT" } } }, "indicesT": { "dtype": "uint32", "shape": [3], "data": { "kind": "values", "values": [1, 2, 0] } }, "scalesT": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, -0.5, 1.0, 2.0, 1.0, 2.0, 0.25] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [3, 68], "tolerance": 0, "data": { "kind": "values", "values": [-0.5, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.0, 1.0, -2.0, -1.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 1.0, -4.0, -2.0, 0.0, 2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 2.0, -4.0, 0.0, 2.0, -4.0, -2.0, 0.0, 2.0, -4.0, 0.0, 2.0, -4.0, -2.0, 0.0, 2.0, -4.0, 0.0, 2.0, -4.0, -2.0, 0.0, 2.0, -4.0, 0.0, 2.0, -4.0, -2.0, 0.0, 2.0, -4.0, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.0, -0.5, -0.25, 0.0, 0.25, 1.0, 0.5, -0.0, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.0, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.0, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.0, 1.0, 0.5, -0.0, -0.5, 1.0, 0.5, -0.0, 1.0, -1.0, 0.0, 1.0, -2.0] } } } }, { "name": "two_bit_q2_zero_1_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 4], "data": { "kind": "values", "values": [228, 36, 57, 73, 147, 211, 228, 52, 78, 142, 147, 227] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [0.25, -0.5, 1.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [252, 253, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 16], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0] } } } }, { "name": "two_bit_q2_zero_1_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [228, 147, 78] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 1], "data": { "kind": "values", "values": [0.25, -0.5, 1.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [252, 253, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 4], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 0.25, 0.5, 0.75, -1.0, 0.5, -0.0, -0.5, 0.0, 1.0, -2.0, -1.0] } } } }, { "name": "two_bit_q2_zero_3_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 12], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, -0.5, 1.0, 2.0, 1.0, 2.0, 0.25] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [236, 241, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 48], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75] } } } }, { "name": "two_bit_q2_zero_3_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 9], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_3_blocks_partial_input_dataT" } } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, -0.5, 1.0, 2.0, 1.0, 2.0, 0.25] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [236, 241, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 36], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 0.0, -6.0, -4.0, 0.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5] } } } }, { "name": "two_bit_q2_zero_4_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 16], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, 2.0, -0.5, 1.0, 2.0, 0.25, 1.0, 2.0, 0.25, -0.5] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [108, 177, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 64], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 2.0, -2.0, 0.0, 2.0, 4.0, -2.0, 0.0, 2.0, -2.0, 0.0, 2.0, 4.0, -2.0, 0.0, 2.0, -2.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5] } } } }, { "name": "two_bit_q2_zero_4_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 13], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 4], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, 2.0, -0.5, 1.0, 2.0, 0.25, 1.0, 2.0, 0.25, -0.5] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [108, 177, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 52], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 2.0, -2.0, 0.0, 2.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -0.25, 0.25, -0.5, -0.25, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5] } } } }, { "name": "two_bit_q2_zero_5_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 20], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 5], "data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, 2.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 252, 177, 253, 198, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 80], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 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 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0] } } } }, { "name": "two_bit_q2_zero_5_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 17], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_multiblock_no_zero_input_dataT" } } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 5], "data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, 2.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 252, 177, 253, 198, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 68], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 0.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name": "two_bit_q2_zero_7_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 28], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 7], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_7_blocks_aligned_input_scalesT" } } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 236, 177, 241, 198, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 112], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0,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, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0] } } } }, { "name": "two_bit_q2_zero_7_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 25], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 7], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_7_blocks_aligned_input_scalesT" } } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 236, 177, 241, 198, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 100], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75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0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75] } } } }, { "name": "two_bit_q2_zero_8_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 32], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 8], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_8_blocks_aligned_input_scalesT" } } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 108, 177, 177, 198, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 128], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, 1.5, 1.0, 0.5, 1.5, 1.0, 0.5, -0.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0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25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0] } } } }, { "name": "two_bit_q2_zero_8_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 29], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 8], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_8_blocks_aligned_input_scalesT" } } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 2], "data": { "kind": "values", "values": [108, 108, 177, 177, 198, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 116], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0.5, 0.0, 0.25, 0.5, 0.75, 0.0, 0.25, 0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0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.25, -0.5, -0.25, 0.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0] } } } }, { "name": "two_bit_q2_zero_9_blocks_aligned", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 36], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 9], "data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, 2.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 3], "data": { "kind": "values", "values": [108, 108, 252, 177, 177, 253, 198, 198, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 144], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, -2.0, -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 0.0, -6.0, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0] } } } }, { "name": "two_bit_q2_zero_9_blocks_partial", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 33], "data": { "kind": "values", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228] } }, "indicesT": { "dtype": "uint32", "shape": [4], "data": { "kind": "values", "values": [2, 0, 1, 2] } }, "scalesT": { "dtype": "float32", "shape": [3, 9], "data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, 2.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 3], "data": { "kind": "values", "values": [108, 108, 252, 177, 177, 253, 198, 198, 254] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [4, 132], "tolerance": 0, "data": { "kind": "values", "values": [0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.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.5, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 0.0, -2.0, -1.0, 0.0, 1.0, -2.0, -1.0, 0.0, -2.0, 0.0, 2.0, 4.0, -2.0, 0.0, 2.0, -2.0, 0.0, 2.0, 4.0, -2.0, 0.0, 2.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.25, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, -0.5, -1.0, 0.5, -0.0, -1.0, 0.5, -0.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, 0.0, 1.0, 3.0, 0.0, 1.0, 2.0, 3.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.0, -6.0, -4.0, -2.0, 0.0, -6.0, -4.0, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.25, 0.0, 0.25, -0.5, -0.25, 0.25, -0.5, -0.0, -0.5, -1.0, 0.5, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, -1.0, 0.0, 1.0, -2.0, 0.0, 1.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 4.0, -2.0, 2.0, 4.0, -2.0, 0.0, 2.0, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, 0.75, 0.0, 0.25, 0.5, 0.75, 0.0, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, 1.5, 1.0, 0.5, -0.0, 1.5, 0.5, -0.0, -2.0, -1.0, 0.0, 1.0] } } } }, { "name": "two_bit_q2_empty_indices", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 9], "data": { "kind": "values", "values": { "$ref": "#/fixtureArrays/two_bit_q2_zero_3_blocks_partial_input_dataT" } } }, "indicesT": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }, "scalesT": { "dtype": "float32", "shape": [3, 3], "data": { "kind": "values", "values": [0.25, -0.5, 1.0, -0.5, 1.0, 2.0, 1.0, 2.0, 0.25] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 1], "data": { "kind": "values", "values": [236, 241, 198] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [0, 36], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "two_bit_q2_empty_data", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [0, 5], "data": { "kind": "values", "values": [] } }, "indicesT": { "dtype": "uint32", "shape": [0], "data": { "kind": "values", "values": [] } }, "scalesT": { "dtype": "float32", "shape": [0, 2], "data": { "kind": "values", "values": [] } }, "zeroPointsT": { "dtype": "uint8", "shape": [0, 1], "data": { "kind": "values", "values": [] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [0, 20], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "two_bit_q2_empty_columns", "provenance": { "notes": "Low-bit-first uint8 two-bit matrix gather; independently computed Python float32 expectations, row-rounded zero-point bytes, complete physical bytes and repeated/reordered row indices." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [3, 0], "data": { "kind": "values", "values": [] } }, "indicesT": { "dtype": "uint32", "shape": [2], "data": { "kind": "values", "values": [2, 0] } }, "scalesT": { "dtype": "float32", "shape": [3, 0], "data": { "kind": "values", "values": [] } }, "zeroPointsT": { "dtype": "uint8", "shape": [3, 0], "data": { "kind": "values", "values": [] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [2, 0], "tolerance": 0, "data": { "kind": "values", "values": [] } } } }, { "name": "two_bit_q2_many_indices_workgroup_tail", "provenance": { "notes": "513 repeated or reordered indices (one past 512) over rows of 17 physical bytes. CPU reference-backed instead of storing 34884 explicit outputs." }, "attrs": { "bits": 2, "block_size": 16 }, "inputs": { "dataT": { "dtype": "uint8", "shape": [17, 17], "data": { "kind": "cycle", "values": [228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 73, 78, 146, 147, 228, 36, 57, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 52, 57, 77, 78, 147, 211, 228, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 227, 228, 56, 57, 78, 142, 147, 57, 121, 78, 158, 147, 231, 228, 57, 121, 78, 158, 147, 231, 228, 57, 121, 78] } }, "indicesT": { "dtype": "uint32", "shape": [513], "data": { "kind": "cycle", "values": [0, 7, 14, 4, 11, 1, 8, 15, 5, 12, 2, 9, 16, 6, 13, 3, 10] } }, "scalesT": { "dtype": "float32", "shape": [17, 5], "data": { "kind": "cycle", "values": [0.25, -0.5, 1.0, 2.0] } }, "zeroPointsT": { "dtype": "uint8", "shape": [17, 2], "data": { "kind": "cycle", "values": [108, 252, 177, 253, 198, 254, 27, 255] } } }, "outputs": { "outputT": { "dtype": "float32", "shape": [513, 68], "tolerance": 0 } }, "tunables": { "WORKGROUP_SIZE": 128 } } ]}README.md+19-13
build/webgpu/bench.json+97-30
build/webgpu/gather-block-quantized-q4-pair.wgsl.jinja → build/webgpu/gather-block-quantized-packed-byte.wgsl.jinjaRenamed+19-7
build/webgpu/gather-block-quantized-q8-vec4.wgsl.jinja+4-3
build/webgpu/manifest.json+1-212
build/webgpu/metadata.json+1-29
build/webgpu/test.json+769-2