| { |
| "domain": "com.microsoft", |
| "name": "MatMulNBitsMlp", |
| "sinceVersion": 1, |
| "description": "Fuses a gated MLP over two block-quantized projections that share one activation: `Y = silu(A_norm @ gate + gate_bias) * (A_norm @ up + up_bias)`, using the `MatMulNBits` weight packing with no zero-point input. `A_norm` is `A`, `SimplifiedLayerNormalization(A, norm_scale)`, or `SkipSimplifiedLayerNormalization(A, skip, norm_scale)`, whose residual sum may be returned as a second output. Only `silu` and the default `accuracy_level = 0` are implemented; bfloat16 is not implemented.", |
| "inputs": [ |
| { |
| "role": "A", |
| "dtype": "T1", |
| "description": "Shared activation of rank 2 `(M, K)` or rank 3 `(batch, sequence, K)`; only the last axis is the reduction axis." |
| }, |
| { |
| "role": "skip", |
| "dtype": "T1", |
| "optional": true, |
| "description": "Residual added to `A` before normalization, with `A`'s shape. Requires `norm_scale`." |
| }, |
| { |
| "role": "norm_scale", |
| "dtype": "T1", |
| "rank": 1, |
| "optional": true, |
| "description": "Simplified-layer-normalization (RMS) gain of shape `[K]`. Absent means the projections read `A` unnormalized." |
| }, |
| { |
| "role": "gate_B", |
| "dtype": "uint8", |
| "rank": 3, |
| "description": "Bit-packed uint8 gate weights of shape `(N, k_blocks, blob_size)`." |
| }, |
| { |
| "role": "gate_scales", |
| "dtype": "T1", |
| "rank": 2, |
| "description": "Per-block gate scales of shape `(N, k_blocks)`, with the same dtype as `A`. Quantization is symmetric: this operator has no zero-point input, so codes are offset by the midpoint `2^(bits - 1)`." |
| }, |
| { |
| "role": "gate_bias", |
| "dtype": "T1", |
| "rank": 1, |
| "optional": true, |
| "description": "Optional gate bias of shape `[N]`, added before the activation." |
| }, |
| { |
| "role": "up_B", |
| "dtype": "uint8", |
| "rank": 3, |
| "description": "Bit-packed up weights, same shape and packing as gate_B." |
| }, |
| { "role": "up_scales", "dtype": "T1", "rank": 2, "description": "Per-block up scales of shape `(N, k_blocks)`." }, |
| { |
| "role": "up_bias", |
| "dtype": "T1", |
| "rank": 1, |
| "optional": true, |
| "description": "Optional up bias of shape `[N]`, added before the product." |
| } |
| ], |
| "outputs": [ |
| { |
| "role": "Y", |
| "dtype": "T1", |
| "rank": "ranks.aT", |
| "shape": "shapes.aT[:-1] + [attrs.N]", |
| "description": "Gated MLP output: A's leading axes with a trailing N." |
| }, |
| { |
| "role": "input_skip_bias_sum", |
| "dtype": "T1", |
| "rank": "ranks.aT", |
| "optional": true, |
| "shape": "shapes.aT", |
| "description": "The residual sum A + skip, with A's shape. Requires the skip input." |
| } |
| ], |
| "attributes": { "accuracy_level": 0, "bits": 4, "epsilon": 0.00001 }, |
| "attributeDescriptions": { |
| "K": "Input feature dimension shared by both quantized weight matrices.", |
| "N": "Output feature dimension shared by both quantized weight matrices.", |
| "accuracy_level": "Minimum internal accuracy level: 0 (unset), 1 (float32), 2 (float16), 3 (bfloat16), or 4 (int8).", |
| "activation": "Activation applied to the gate projection; this implementation supports `silu`.", |
| "bits": "Bit width used to quantize both weight matrices; this implementation supports 2, 4, and 8.", |
| "block_size": "Size of each quantization block along K.", |
| "epsilon": "Epsilon used by the optional fused RMS normalization." |
| }, |
| "attributeConstraints": { |
| "K": { "required": true }, |
| "N": { "required": true }, |
| "accuracy_level": { "values": [0] }, |
| "activation": { "required": true, "values": ["silu"] }, |
| "bits": { "values": [2, 4, 8] }, |
| "block_size": { "required": true } |
| }, |
| "typeConstraints": { "T1": ["float32", "float16"] }, |
| "args": { |
| "aT": { "kind": "tensor", "semantic": "A", "role": "input" }, |
| "skipT": { "kind": "tensor", "semantic": "skip", "role": "input", "required": false }, |
| "normScaleT": { "kind": "tensor", "semantic": "norm_scale", "role": "weights", "required": false }, |
| "gateBT": { "kind": "tensor", "semantic": "gate_B", "role": "weights" }, |
| "gateScalesT": { "kind": "tensor", "semantic": "gate_scales", "role": "weights" }, |
| "gateBiasT": { "kind": "tensor", "semantic": "gate_bias", "role": "weights", "required": false }, |
| "upBT": { "kind": "tensor", "semantic": "up_B", "role": "weights" }, |
| "upScalesT": { "kind": "tensor", "semantic": "up_scales", "role": "weights" }, |
| "upBiasT": { "kind": "tensor", "semantic": "up_bias", "role": "weights", "required": false }, |
| "yT": { "kind": "tensor", "semantic": "Y", "role": "output" }, |
| "residualT": { "kind": "tensor", "semantic": "input_skip_bias_sum", "role": "output", "required": false } |
| }, |
| "tunables": { "TILE_N": 8, "LANES": 8, "NORM_WORKGROUP_SIZE": 128, "ROW_TILE": 8 }, |
| "derive": { |
| "aRows": "numel(shapes.aT) / max(1, attrs.K)", |
| "rowTile": "1 if aRows <= 1 else min(aRows, tunables.ROW_TILE)", |
| "rowGroups": "ceilDiv(aRows, rowTile)", |
| "kBlocks": "dim(shapes.gateBT, 1)", |
| "blobSize": "dim(shapes.gateBT, 2)", |
| "codesPerByte": "8 / attrs.bits", |
| "codeMask": "3 if attrs.bits == 2 else (15 if attrs.bits == 4 else 255)", |
| "epsilonValue": "attrs.epsilon", |
| "bitsSupported": "attrs.bits == 2 or attrs.bits == 4 or attrs.bits == 8", |
| "weightShapeOk": "ranks.gateBT == 3 and ranks.upBT == 3 and dim(shapes.gateBT, 0) == attrs.N and dim(shapes.upBT, 0) == attrs.N and dim(shapes.upBT, 1) == kBlocks and dim(shapes.upBT, 2) == blobSize and kBlocks == ceilDiv(attrs.K, attrs.block_size) and blobSize * 8 == attrs.block_size * attrs.bits", |
| "scaleShapeOk": "ranks.gateScalesT == 2 and ranks.upScalesT == 2 and dim(shapes.gateScalesT, 0) == attrs.N and dim(shapes.gateScalesT, 1) == kBlocks and dim(shapes.upScalesT, 0) == attrs.N and dim(shapes.upScalesT, 1) == kBlocks", |
| "ioShapeOk": "(ranks.aT == 2 or ranks.aT == 3) and dim(shapes.aT, ranks.aT - 1) == attrs.K and ranks.yT == ranks.aT and dim(shapes.yT, ranks.yT - 1) == attrs.N and sameShape(prefix(shapes.yT, ranks.yT - 1), prefix(shapes.aT, ranks.aT - 1))", |
| "biasShapeOk": "(ranks.gateBiasT == 1 and dim(shapes.gateBiasT, 0) == attrs.N if present.gateBiasT else true) and (ranks.upBiasT == 1 and dim(shapes.upBiasT, 0) == attrs.N if present.upBiasT else true)", |
| "dtypeOk": "tensorDtypes.gateScalesT == tensorDtypes.aT and tensorDtypes.upScalesT == tensorDtypes.aT and tensorDtypes.yT == tensorDtypes.aT and f16Ok(tensorDtypes.aT)", |
| "lanesPow2": "tunables.LANES == pow2ceil(tunables.LANES)", |
| "mlpShapeOk": "bitsSupported and weightShapeOk and scaleShapeOk and ioShapeOk and biasShapeOk and dtypeOk and lanesPow2 and attrs.K > 0 and attrs.N > 0 and attrs.block_size > 0", |
| "normContractOk": "present.normScaleT and ranks.normScaleT == 1 and dim(shapes.normScaleT, 0) == attrs.K and tensorDtypes.normScaleT == tensorDtypes.aT and (sameShape(shapes.skipT, shapes.aT) and tensorDtypes.skipT == tensorDtypes.aT if present.skipT else true) and (sameShape(shapes.residualT, shapes.aT) and tensorDtypes.residualT == tensorDtypes.aT and present.skipT if present.residualT else true)", |
| "gateUpDispatchFits": "ceilDiv(attrs.N, tunables.TILE_N) <= device.limits.maxComputeWorkgroupsPerDimension and aRows <= device.limits.maxComputeWorkgroupsPerDimension and tunables.TILE_N * tunables.LANES <= device.limits.maxComputeInvocationsPerWorkgroup and tunables.TILE_N * tunables.LANES <= device.limits.maxComputeWorkgroupSizeX", |
| "normDispatchFits": "tunables.NORM_WORKGROUP_SIZE <= device.limits.maxComputeInvocationsPerWorkgroup and tunables.NORM_WORKGROUP_SIZE <= device.limits.maxComputeWorkgroupSizeX", |
| "biasPresence_nogb_noub": "not present.gateBiasT and not present.upBiasT", |
| "biasPresence_nogb_ub": "not present.gateBiasT and present.upBiasT", |
| "biasPresence_gb_noub": "present.gateBiasT and not present.upBiasT", |
| "biasPresence_gb_ub": "present.gateBiasT and present.upBiasT" |
| }, |
| "constants": { |
| "aScalar": "\"f16\" if tensorDtypes.aT == \"float16\" else \"f32\"", |
| "scalar": "\"f16\" if tensorDtypes.aT == \"float16\" else \"f32\"", |
| "usesF16": "tensorDtypes.aT == \"float16\"", |
| "K": "attrs.K", |
| "N": "attrs.N", |
| "blockSize": "attrs.block_size", |
| "kBlocks": "kBlocks", |
| "blobSize": "blobSize", |
| "bits": "attrs.bits", |
| "codesPerByte": "codesPerByte", |
| "codeMask": "codeMask", |
| "defaultZero": "\"2.0\" if attrs.bits == 2 else (\"8.0\" if attrs.bits == 4 else \"128.0\")", |
| "tileN": "tunables.TILE_N", |
| "lanes": "tunables.LANES", |
| "rowTile": "rowTile", |
| "rows": "aRows", |
| "hidden": "attrs.K", |
| "workgroupSize": "tunables.NORM_WORKGROUP_SIZE", |
| "epsilon": "epsilonValue", |
| "hasGateBias": "present.gateBiasT", |
| "hasUpBias": "present.upBiasT", |
| "hasSkip": "present.skipT", |
| "writeResidual": "present.residualT", |
| "K_LEN": "attrs.K", |
| "N_LEN": "attrs.N" |
| }, |
| "bindingSets": { |
| "normFull": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "storage" }, "elementType": "f32" }, |
| { |
| "name": "residual", |
| "arg": "residualT", |
| "semantic": "input_skip_bias_sum", |
| "buffer": { "type": "storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "params", |
| "semantic": "kernel.params", |
| "buffer": { "type": "uniform" }, |
| "struct": { "name": "Params", "fields": [{ "name": "rows", "type": "u32", "value": "aRows" }] } |
| } |
| ], |
| "normSkip": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "storage" }, "elementType": "f32" }, |
| { |
| "name": "params", |
| "semantic": "kernel.params", |
| "buffer": { "type": "uniform" }, |
| "struct": { "name": "Params", "fields": [{ "name": "rows", "type": "u32", "value": "aRows" }] } |
| } |
| ], |
| "normOnly": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "storage" }, "elementType": "f32" }, |
| { |
| "name": "params", |
| "semantic": "kernel.params", |
| "buffer": { "type": "uniform" }, |
| "struct": { "name": "Params", "fields": [{ "name": "rows", "type": "u32", "value": "aRows" }] } |
| } |
| ], |
| "gateUpAFull": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "gateUpNormedFull": [ |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "read-only-storage" }, "elementType": "f32" }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fusedFull": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" }, |
| { |
| "name": "residual", |
| "arg": "residualT", |
| "semantic": "input_skip_bias_sum", |
| "buffer": { "type": "storage" }, |
| "elementType": "$aScalar" |
| } |
| ], |
| "gateUpA_nogb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "gateUpNormed_nogb_noub": [ |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "read-only-storage" }, "elementType": "f32" }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_norm_nogb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skip_nogb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skipsum_nogb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" }, |
| { |
| "name": "residual", |
| "arg": "residualT", |
| "semantic": "input_skip_bias_sum", |
| "buffer": { "type": "storage" }, |
| "elementType": "$aScalar" |
| } |
| ], |
| "gateUpA_nogb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "gateUpNormed_nogb_ub": [ |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "read-only-storage" }, "elementType": "f32" }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_norm_nogb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skip_nogb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skipsum_nogb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" }, |
| { |
| "name": "residual", |
| "arg": "residualT", |
| "semantic": "input_skip_bias_sum", |
| "buffer": { "type": "storage" }, |
| "elementType": "$aScalar" |
| } |
| ], |
| "gateUpA_gb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "gateUpNormed_gb_noub": [ |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "read-only-storage" }, "elementType": "f32" }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_norm_gb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skip_gb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skipsum_gb_noub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" }, |
| { |
| "name": "residual", |
| "arg": "residualT", |
| "semantic": "input_skip_bias_sum", |
| "buffer": { "type": "storage" }, |
| "elementType": "$aScalar" |
| } |
| ], |
| "gateUpA_gb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "gateUpNormed_gb_ub": [ |
| { "name": "normed", "semantic": "normedA", "buffer": { "type": "read-only-storage" }, "elementType": "f32" }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_norm_gb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ], |
| "fused_skip_gb_ub": [ |
| { |
| "name": "a", |
| "arg": "aT", |
| "semantic": "A", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "skip", |
| "arg": "skipT", |
| "semantic": "skip", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "norm_scale", |
| "arg": "normScaleT", |
| "semantic": "norm_scale", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$K_LEN" |
| }, |
| { |
| "name": "gate_b", |
| "arg": "gateBT", |
| "semantic": "gate_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "gate_scales", |
| "arg": "gateScalesT", |
| "semantic": "gate_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "gate_bias", |
| "arg": "gateBiasT", |
| "semantic": "gate_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { |
| "name": "up_b", |
| "arg": "upBT", |
| "semantic": "up_B", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "u32" |
| }, |
| { |
| "name": "up_scales", |
| "arg": "upScalesT", |
| "semantic": "up_scales", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar" |
| }, |
| { |
| "name": "up_bias", |
| "arg": "upBiasT", |
| "semantic": "up_bias", |
| "buffer": { "type": "read-only-storage" }, |
| "elementType": "$aScalar", |
| "length": "$N_LEN" |
| }, |
| { "name": "y", "arg": "yT", "semantic": "Y", "buffer": { "type": "storage" }, "elementType": "$aScalar" } |
| ] |
| }, |
| "variants": [ |
| { |
| "id": "plain_nogb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "not present.normScaleT", "not present.skipT", "not present.residualT", "biasPresence_nogb_noub", "gateUpDispatchFits"], |
| "constants": { "inlineNorm": "0", "fromNormed": "0" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpA_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "plain_nogb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "not present.normScaleT", "not present.skipT", "not present.residualT", "biasPresence_nogb_ub", "gateUpDispatchFits"], |
| "constants": { "inlineNorm": "0", "fromNormed": "0" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpA_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "plain_gb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "not present.normScaleT", "not present.skipT", "not present.residualT", "biasPresence_gb_noub", "gateUpDispatchFits"], |
| "constants": { "inlineNorm": "0", "fromNormed": "0" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpA_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "plain_gb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "not present.normScaleT", "not present.skipT", "not present.residualT", "biasPresence_gb_ub", "gateUpDispatchFits"], |
| "constants": { "inlineNorm": "0", "fromNormed": "0" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpA_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_norm_nogb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "normDispatchFits", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normOnly", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skip_nogb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normSkip", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skipsum_nogb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normFull", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_norm_nogb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "normDispatchFits", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normOnly", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skip_nogb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normSkip", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skipsum_nogb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normFull", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_norm_gb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "normDispatchFits", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normOnly", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skip_gb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normSkip", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skipsum_gb_noub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normFull", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_norm_gb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_ub", "gateUpDispatchFits", "normDispatchFits", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normOnly", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skip_gb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_ub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normSkip", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "staged_skipsum_gb_ub", |
| "priority": 10, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_ub", "gateUpDispatchFits", "normDispatchFits", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "0", "fromNormed": "1" }, |
| "intermediates": [{ "id": "normedA", "dtype": "float32", "shape": "[numel(shapes.aT)]" }], |
| "passes": [ |
| { |
| "id": "norm", |
| "name": "MatMulNBitsMlp.RmsNorm", |
| "shader": "matmul-nbits-fused-rms-norm.wgsl.jinja", |
| "bindings": "normFull", |
| "dispatch": { "workgroups": "aRows" } |
| }, |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.GateUp", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "gateUpNormed_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "rowGroups" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_norm_nogb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 7 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "aRows == 1", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_norm_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skip_nogb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 8 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skip_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skipsum_nogb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 9 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_noub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skipsum_nogb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_norm_nogb_ub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 8 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "aRows == 1", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_norm_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skip_nogb_ub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 9 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skip_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skipsum_nogb_ub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 10 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_nogb_ub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skipsum_nogb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_norm_gb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 8 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "aRows == 1", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_norm_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skip_gb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 9 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skip_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skipsum_gb_noub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 10 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_noub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skipsum_gb_noub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_norm_gb_ub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 9 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_ub", "gateUpDispatchFits", "aRows == 1", "not present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_norm_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| }, |
| { |
| "id": "fused_skip_gb_ub", |
| "priority": 30, |
| "requires": { "limits": { "maxStorageBuffersPerShaderStage": 10 } }, |
| "when": ["mlpShapeOk", "normContractOk", "biasPresence_gb_ub", "gateUpDispatchFits", "aRows == 1", "present.skipT", "not present.residualT"], |
| "constants": { "inlineNorm": "1", "fromNormed": "0", "rowTile": "1" }, |
| "passes": [ |
| { |
| "id": "main", |
| "name": "MatMulNBitsMlp.FusedDecode", |
| "shader": "mlp-gate-up.wgsl.jinja", |
| "bindings": "fused_skip_gb_ub", |
| "dispatch": { "x": "ceilDiv(attrs.N, tunables.TILE_N)", "y": "aRows" } |
| } |
| ] |
| } |
| ] |
| } |
|
|