name stringlengths 8 50 | source stringclasses 5
values | op_type stringlengths 3 16 | description stringlengths 14 935 | eval_set bool 2
classes | eval_group stringclasses 6
values | subset_sve bool 2
classes | subset_sme2 bool 2
classes | num_workloads int64 4 24 | baselines listlengths 0 3 | tags listlengths 1 6 | axes stringlengths 22 549 | inputs stringlengths 41 901 | outputs stringlengths 43 94 | constraints stringclasses 4
values | reference stringlengths 52 2.32k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
conv2d_f16_nhwc_kh3_kw3_valid_c32_c64 | kleidiai | conv2d | 'Valid' (no padding) 2D conv, Kh=Kw=3 stride=1, NHWC/HWIO, C_in=32/C_out=64 baked, N=1. A/weight/bias are f16 (raw uint16 bit-pattern per this repo's raw ABI convention -- bench/datasets/raw.py's _DTYPE_TO_NP_AND_PTR); output stays float32 (RawDataset always allocates a float32 output buffer). This definition exists to... | true | kleidiai-sme2 | false | false | 20 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"H": {"type": "var"}, "W": {"type": "var"}, "H_out": {"type": "var"}, "W_out": {"type": "var"}, "N": {"type": "const", "value": 1}, "C_in": {"type": "const", "value": 32}, "C_out": {"type": "const", "value": 64}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}} | {"input": {"shape": ["N", "H", "W", "C_in"], "dtype": "float16"}, "weight": {"shape": ["Kh", "Kw", "C_in", "C_out"], "dtype": "float16"}, "bias": {"shape": ["C_out"], "dtype": "float16"}} | {"output": {"shape": ["N", "H_out", "W_out", "C_out"], "dtype": "float32"}} | ["H_out == H - Kh + 1", "W_out == W - Kw + 1"] | import numpy as np
import torch
import torch.nn.functional as F
def run(input, weight, bias):
# input: [N,H,W,C_in] f16 -> NCHW f32 for torch
x = torch.from_numpy(input.astype(np.float32)).permute(0, 3, 1, 2)
# weight: [Kh,Kw,C_in,C_out] -> torch [C_out,C_in,Kh,Kw]
w = torch.from_numpy(weight.astype(n... |
conv2d_fp32_kh1_kw1_sh1_sw1_dh1_dw1_p0 | ncnn | conv2d | 2D conv 1x1 stride=(1,1) dilation=(1,1) pad=(0,0). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 1}, "Kw": {"type": "const", "value": 1}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(1, 1), padding=(0, 0),
dilation=(1, 1)).numpy()
|
conv2d_fp32_kh1_kw1_sh2_sw2_dh1_dw1_p0 | ncnn | conv2d | 2D conv 1x1 stride=(2,2) dilation=(1,1) pad=(0,0). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 1}, "Kw": {"type": "const", "value": 1}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(2, 2), padding=(0, 0),
dilation=(1, 1)).numpy()
|
conv2d_fp32_kh3_kw3_sh1_sw1_dh1_dw1_p1 | ncnn | conv2d | 2D conv 3x3 stride=(1,1) dilation=(1,1) pad=(1,1). C_in and C_out vary per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(1, 1), padding=(1, 1),
dilation=(1, 1)).numpy()
|
conv2d_fp32_kh3_kw3_sh2_sw2_dh1_dw1_p1 | ncnn | conv2d | 2D conv 3x3 stride=(2,2) dilation=(1,1) pad=(1,1). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(2, 2), padding=(1, 1),
dilation=(1, 1)).numpy()
|
conv2d_fp32_kh7_kw7_sh2_sw2_dh1_dw1_p3 | ncnn | conv2d | 2D conv 7x7 stride=(2,2) dilation=(1,1) pad=(3,3). C_in and C_out vary per workload. | true | ncnn | true | true | 11 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 7}, "Kw": {"type": "const", "value": 7}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(2, 2), padding=(3, 3),
dilation=(1, 1)).numpy()
|
conv2d_fp32_nhwc_kh3_kw3_s1_p1_c32_c64 | kleidiai | conv2d | 'Same' conv2d (Kh=Kw=3, stride=1, pad=1, so H_out=H/W_out=W) in NHWC input / HWIO weight layout (channels-last) — distinct from this repo's other conv2d definitions (NCHW-style, via ncnn's Mat convention). Chosen deliberately to match Arm KleidiAI's imatmul indirection-buffer convention directly (no transpose needed in... | true | kleidiai | false | false | 16 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"N": {"type": "var"}, "H": {"type": "var"}, "W": {"type": "var"}, "C_in": {"type": "const", "value": 32}, "C_out": {"type": "const", "value": 64}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "pad": {"type": "const", "value": 1}, "stride": {"type": "const", "value": 1}} | {"input": {"shape": ["N", "H", "W", "C_in"], "dtype": "float32"}, "weight": {"shape": ["Kh", "Kw", "C_in", "C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "H", "W", "C_out"], "dtype": "float32"}} | [] | import numpy as np
def run(input, weight):
N, H, W, C_in = input.shape
Kh, Kw, _, C_out = weight.shape
pad = 1
padded = np.pad(input, ((0, 0), (pad, pad), (pad, pad), (0, 0)))
out = np.zeros((N, H, W, C_out), dtype=np.float32)
for n in range(N):
for oh in range(H):
for ow in ... |
conv2d_fp32_nhwc_kh3_kw3_s1_p1_c32_c64_sme2 | kleidiai | conv2d | 'Same' conv2d (Kh=Kw=3, stride=1, pad=1, so H_out=H/W_out=W) in NHWC input / HWIO weight layout (channels-last) — distinct from this repo's other conv2d definitions (NCHW-style, via ncnn's Mat convention). Chosen deliberately to match Arm KleidiAI's imatmul indirection-buffer convention directly (no transpose needed in... | true | kleidiai-sme2 | false | false | 16 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"N": {"type": "var"}, "H": {"type": "var"}, "W": {"type": "var"}, "C_in": {"type": "const", "value": 32}, "C_out": {"type": "const", "value": 64}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "pad": {"type": "const", "value": 1}, "stride": {"type": "const", "value": 1}} | {"input": {"shape": ["N", "H", "W", "C_in"], "dtype": "float32"}, "weight": {"shape": ["Kh", "Kw", "C_in", "C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "H", "W", "C_out"], "dtype": "float32"}} | [] | import numpy as np
def run(input, weight):
N, H, W, C_in = input.shape
Kh, Kw, _, C_out = weight.shape
pad = 1
padded = np.pad(input, ((0, 0), (pad, pad), (pad, pad), (0, 0)))
out = np.zeros((N, H, W, C_out), dtype=np.float32)
for n in range(N):
for oh in range(H):
for ow in ... |
conv2d_w8a8ch_kh1_kw1_sh1_sw1_dh1_dw1_p0 | ncnn | conv2d | 2D conv 1x1 stride=(1,1) dilation=(1,1) pad=(0,0). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 1}, "Kw": {"type": "const", "value": 1}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C_out"], "dtype": "float32"}, "input_scale": {"shape": null, "dtype": "float32"}, "weight_scales": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scale, weight_scales):
N, Cin, H, W = input.shape
Cout = weight.shape[0]
Kh, Kw = 1, 1
Sh, Sw = 1, 1
Dh, Dw = 1, 1
Ph, Pw = 0, 0
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
... |
conv2d_w8a8ch_kh1_kw1_sh2_sw2_dh1_dw1_p0 | ncnn | conv2d | 2D conv 1x1 stride=(2,2) dilation=(1,1) pad=(0,0). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 1}, "Kw": {"type": "const", "value": 1}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C_out"], "dtype": "float32"}, "input_scale": {"shape": null, "dtype": "float32"}, "weight_scales": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scale, weight_scales):
N, Cin, H, W = input.shape
Cout = weight.shape[0]
Kh, Kw = 1, 1
Sh, Sw = 2, 2
Dh, Dw = 1, 1
Ph, Pw = 0, 0
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
... |
conv2d_w8a8ch_kh3_kw3_sh1_sw1_dh1_dw1_p1 | ncnn | conv2d | 2D conv 3x3 stride=(1,1) dilation=(1,1) pad=(1,1). C_in and C_out vary per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C_out"], "dtype": "float32"}, "input_scale": {"shape": null, "dtype": "float32"}, "weight_scales": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scale, weight_scales):
N, Cin, H, W = input.shape
Cout = weight.shape[0]
Kh, Kw = 3, 3
Sh, Sw = 1, 1
Dh, Dw = 1, 1
Ph, Pw = 1, 1
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
... |
conv2d_w8a8ch_kh3_kw3_sh2_sw2_dh1_dw1_p1 | ncnn | conv2d | 2D conv 3x3 stride=(2,2) dilation=(1,1) pad=(1,1). C_in and C_out vary per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C_out"], "dtype": "float32"}, "input_scale": {"shape": null, "dtype": "float32"}, "weight_scales": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scale, weight_scales):
N, Cin, H, W = input.shape
Cout = weight.shape[0]
Kh, Kw = 3, 3
Sh, Sw = 2, 2
Dh, Dw = 1, 1
Ph, Pw = 1, 1
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
... |
conv2d_w8a8ch_kh7_kw7_sh2_sw2_dh1_dw1_p3 | ncnn | conv2d | 2D conv 7x7 stride=(2,2) dilation=(1,1) pad=(3,3). C_in and C_out vary per workload. | true | ncnn | true | true | 11 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C_in": {"type": "var"}, "C_out": {"type": "var"}, "Kh": {"type": "const", "value": 7}, "Kw": {"type": "const", "value": 7}, "Sh": {"type": "... | {"input": {"shape": ["N", "C_in", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C_out", "C_in", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C_out"], "dtype": "float32"}, "input_scale": {"shape": null, "dtype": "float32"}, "weight_scales": {"shape": ["C_out"], "dtype": "float32"}} | {"output": {"shape": ["N", "C_out", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scale, weight_scales):
N, Cin, H, W = input.shape
Cout = weight.shape[0]
Kh, Kw = 7, 7
Sh, Sw = 2, 2
Dh, Dw = 1, 1
Ph, Pw = 3, 3
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
... |
conv2d_depthwise_f16_nhwc_kh3_kw3_s1_p1 | kleidiai | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(1,1) 'same' pad=(1,1), NHWC layout, depth_multiplier=1 (C_in=C_out=C=groups), N=1, f16 throughout inputs (raw uint16 bit patterns per this repo's raw ABI convention), f32 output (RawDataset always allocates float32 output). SME2 counterpart to conv2d_depthwise_fp32_nhwc_kh3_kw3_s1_p1 (f32/... | true | kleidiai-sme2 | false | false | 20 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"H": {"type": "var"}, "W": {"type": "var"}, "H_out": {"type": "var"}, "W_out": {"type": "var"}, "C": {"type": "var"}, "N": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "const", "value": 1}, "Sw": {"type": "const", "value": 1}, "pad_top": {"type... | {"input": {"shape": ["N", "H", "W", "C"], "dtype": "float16"}, "weight": {"shape": ["Kh", "Kw", "C"], "dtype": "float16"}, "bias": {"shape": ["C"], "dtype": "float16"}} | {"output": {"shape": ["N", "H_out", "W_out", "C"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - (Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - (Kw-1) - 1) // Sw + 1"] | import numpy as np
import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input.astype(np.float32)).permute(0, 3, 1, 2)
w = torch.from_numpy(weight.astype(np.float32)).permute(2, 0, 1).unsqueeze(1)
b = torch.from_numpy(bias.astype(np.float32))
y = F.conv2d(x, w... |
conv2d_depthwise_fp32_kh3_kw3_sh1_sw1_dh1_dw1_p1 | ncnn | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(1,1) dilation=(1,1) pad=(1,1). C (=C_in=C_out=groups) varies per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(1, 1), padding=(1, 1),
dilation=(1, 1), groups=x.shape[1]).numpy()
|
conv2d_depthwise_fp32_kh3_kw3_sh2_sw2_dh1_dw1_p1 | ncnn | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(2,2) dilation=(1,1) pad=(1,1). C (=C_in=C_out=groups) varies per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(2, 2), padding=(1, 1),
dilation=(1, 1), groups=x.shape[1]).numpy()
|
conv2d_depthwise_fp32_kh5_kw5_sh1_sw1_dh1_dw1_p2 | ncnn | conv2d_depthwise | Depthwise 2D conv 5x5 stride=(1,1) dilation=(1,1) pad=(2,2). C (=C_in=C_out=groups) varies per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 5}, "Kw": {"type": "const", "value": 5}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(1, 1), padding=(2, 2),
dilation=(1, 1), groups=x.shape[1]).numpy()
|
conv2d_depthwise_fp32_kh5_kw5_sh2_sw2_dh1_dw1_p2 | ncnn | conv2d_depthwise | Depthwise 2D conv 5x5 stride=(2,2) dilation=(1,1) pad=(2,2). C (=C_in=C_out=groups) varies per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 5}, "Kw": {"type": "const", "value": 5}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "float32"}, "bias": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
x = torch.from_numpy(input)
w = torch.from_numpy(weight)
b = torch.from_numpy(bias)
return F.conv2d(x, w, b, stride=(2, 2), padding=(2, 2),
dilation=(1, 1), groups=x.shape[1]).numpy()
|
conv2d_depthwise_fp32_nhwc_kh3_kw3_s1_p1 | kleidiai | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(1,1) 'same' pad=(1,1), NHWC layout, depth_multiplier=1 (C_in=C_out=C=groups), N=1. NHWC (not NCHW like conv2d_depthwise_fp32_kh3_kw3_sh1_sw1_dh1_dw1_p1) because this definition exists to host a KleidiAI SME2 baseline (kai_dwconv_clamp_f32_f32_f32p1vlx1b_3x3_s1_4xc_sme2_mla), which requires... | true | kleidiai-sme2 | false | false | 20 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"H": {"type": "var"}, "W": {"type": "var"}, "H_out": {"type": "var"}, "W_out": {"type": "var"}, "C": {"type": "var"}, "N": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "const", "value": 1}, "Sw": {"type": "const", "value": 1}, "pad_top": {"type... | {"input": {"shape": ["N", "H", "W", "C"], "dtype": "float32"}, "weight": {"shape": ["Kh", "Kw", "C"], "dtype": "float32"}, "bias": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "H_out", "W_out", "C"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - (Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - (Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input, weight, bias):
# input: [N,H,W,C] -> NCHW for torch
x = torch.from_numpy(input).permute(0, 3, 1, 2)
# weight: [Kh,Kw,C] -> torch depthwise weight [C,1,Kh,Kw]
w = torch.from_numpy(weight).permute(2, 0, 1).unsqueeze(1)
b = torch.from_numpy(... |
conv2d_depthwise_w8a8ch_kh3_kw3_sh1_sw1_dh1_dw1_p1 | ncnn | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(1,1) dilation=(1,1) pad=(1,1). C (=C_in=C_out=groups) varies per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C"], "dtype": "float32"}, "input_scales": {"shape": ["C"], "dtype": "float32"}, "weight_scales": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scales, weight_scales):
N, C, H, W = input.shape
Kh, Kw = 3, 3
Sh, Sw = 1, 1
Dh, Dw = 1, 1
Ph, Pw = 1, 1
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
input_f = input.astype(np.fl... |
conv2d_depthwise_w8a8ch_kh3_kw3_sh2_sw2_dh1_dw1_p1 | ncnn | conv2d_depthwise | Depthwise 2D conv 3x3 stride=(2,2) dilation=(1,1) pad=(1,1). C (=C_in=C_out=groups) varies per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C"], "dtype": "float32"}, "input_scales": {"shape": ["C"], "dtype": "float32"}, "weight_scales": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scales, weight_scales):
N, C, H, W = input.shape
Kh, Kw = 3, 3
Sh, Sw = 2, 2
Dh, Dw = 1, 1
Ph, Pw = 1, 1
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
input_f = input.astype(np.fl... |
conv2d_depthwise_w8a8ch_kh5_kw5_sh1_sw1_dh1_dw1_p2 | ncnn | conv2d_depthwise | Depthwise 2D conv 5x5 stride=(1,1) dilation=(1,1) pad=(2,2). C (=C_in=C_out=groups) varies per workload. | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 5}, "Kw": {"type": "const", "value": 5}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C"], "dtype": "float32"}, "input_scales": {"shape": ["C"], "dtype": "float32"}, "weight_scales": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scales, weight_scales):
N, C, H, W = input.shape
Kh, Kw = 5, 5
Sh, Sw = 1, 1
Dh, Dw = 1, 1
Ph, Pw = 2, 2
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
input_f = input.astype(np.fl... |
conv2d_depthwise_w8a8ch_kh5_kw5_sh2_sw2_dh1_dw1_p2 | ncnn | conv2d_depthwise | Depthwise 2D conv 5x5 stride=(2,2) dilation=(1,1) pad=(2,2). C (=C_in=C_out=groups) varies per workload. | true | ncnn | false | false | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:mobilenetv3-large",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "C_group": {"type": "const", "value": 1}, "Kh": {"type": "const", "value": 5}, "Kw": {"type": "const", "value": 5}, "Sh... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "int8"}, "weight": {"shape": ["C", "C_group", "Kh", "Kw"], "dtype": "int8"}, "bias": {"shape": ["C"], "dtype": "float32"}, "input_scales": {"shape": ["C"], "dtype": "float32"}, "weight_scales": {"shape": ["C"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import numpy as np
def run(input, weight, bias, input_scales, weight_scales):
N, C, H, W = input.shape
Kh, Kw = 5, 5
Sh, Sw = 2, 2
Dh, Dw = 1, 1
Ph, Pw = 2, 2
Hout = (H + 2 * Ph - Dh * (Kh - 1) - 1) // Sh + 1
Wout = (W + 2 * Pw - Dw * (Kw - 1) - 1) // Sw + 1
input_f = input.astype(np.fl... |
gemm_bf16_n1024_k2048 | llama.cpp | gemm | expert ffn N=1024 K=2048 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 2048}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K"], "dtype": "bfloat16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A.astype(np.float32) @ B.astype(np.float32).T
|
gemm_bf16_n1408_k2048 | llama.cpp | gemm | expert ffn N=1408 K=2048 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1408}, "K": {"type": "const", "value": 2048}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K"], "dtype": "bfloat16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A.astype(np.float32) @ B.astype(np.float32).T
|
gemm_bf16_n2048_k1024 | llama.cpp | gemm | expert ffn N=2048 K=1024 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1024}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K"], "dtype": "bfloat16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A.astype(np.float32) @ B.astype(np.float32).T
|
gemm_bf16_n2048_k1408 | llama.cpp | gemm | expert ffn N=2048 K=1408 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1408}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K"], "dtype": "bfloat16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A.astype(np.float32) @ B.astype(np.float32).T
|
gemm_bf16_n2048_k2048 | llama.cpp | gemm | attn proj N=2048 K=2048 | true | llama.cpp | true | true | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 2048}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K"], "dtype": "bfloat16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A.astype(np.float32) @ B.astype(np.float32).T
|
gemm_bf16_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, compute-precision-only bf16: A[M,K]/B[K,N]/bias[N] are fp32 wire format (the actual KleidiAI packers kai_lhs_pack_bf16p2vlx2_f32_sme2 / kai_rhs_pack_kxn_bf16p2vlx2b_f32_x32_sme both take raw f32 input and truncate to bf16 internally as part of packing -- there is no bf16 data anywhere upstream, ... | true | kleidiai-sme2 | false | false | 15 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B": {"shape": ["K", "N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B, bias):
return (A.astype(np.float32) @ B.astype(np.float32) + bias.astype(np.float32)).astype(np.float32)
|
gemm_f16_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, f16 throughout inputs (A[M,K], B[K,N] -- 'kxn' layout matching kai_rhs_pack_kxn_x16p2vlx2b_x16_x16_sme's native input layout, no transpose needed -- and bias[N], all raw uint16 bit patterns per this repo's raw ABI convention for float16-dtype tensors), f32 output (RawDataset always allocates flo... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float16"}, "B": {"shape": ["K", "N"], "dtype": "float16"}, "bias": {"shape": ["N"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B, bias):
return (A.astype(np.float32) @ B.astype(np.float32) + bias.astype(np.float32)).astype(np.float32)
|
gemm_f16_qai4c32_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, fp16 activations x block-wise asymmetric int4 weights, fp16 kernel family (SME2): A float16 [M,K] (raw patterns), B_q4 uint8 [N,K/2] adjacent-pair nibbles (byte j: k=2j low, k=2j+1 high), per-block (length 32) fp32 scale B_scales and fp32 additive offset B_zeros [N,K/32] already in the real doma... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "B_zeros": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, B_zeros, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
s = np.repeat(B_scales.astype(np.float32), 32, axis=1)
... |
gemm_f16_qs4cx_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, fp16 activations x per-channel int4 weights, fp16 kernel family (SME2): A float16 [M,K] (raw patterns), B_q4 uint8 [N,K/2] adjacent-pair nibbles (byte j: k=2j low, k=2j+1 high), zero_point=8, one fp32 scale per output channel, fp32 bias [N]; dequant via value=(nibble-8)*scale. The kernel's nativ... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}} | {"A": {"shape": ["M", "K"], "dtype": "float16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
B = deq * B_scales.astype(np.float32)[:, None]
return (A.astyp... |
gemm_f16_qs8cx_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, fp16 activations x per-channel int8 weights, fp16 kernel family (SME2): A float16 [M,K] (raw patterns), B_q8 int8 [N,K] + one fp32 scale per output channel (value=q*scale, no zero point), fp32 bias [N]. The kernel's native output is fp16; the raw ABI allocates float32 outputs, so the binding wid... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float16"}, "B_q8": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q8, B_scales, bias):
B = B_q8.astype(np.float32) * B_scales.astype(np.float32)[:, None]
return (A.astype(np.float32) @ B.T + bias.astype(np.float32)).astype(np.float32)
|
gemm_f16act_qs4c32_sme2_n256_k512 | kleidiai | gemm | GEMM, N=256 K=512, fp16 activations x block-wise int4 weights (SME2): A is float16 [M,K] (raw 16-bit patterns per the raw ABI), B_q4 uint8 [N,K/2] and f16 per-block scales exactly as gemm_qs4c32_sme2_n256_k512 (block length 32, zero_point=8, split-half nibbles); no bias; f32 output. The mixed fp16-activation / int4-wei... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales):
n, k_half = B_q4.shape
bl = 32
nb = k_half // (bl // 2)
lo = (B_q4 & 0x0F).astype(np.float32) - 8.0
hi = (B_q4 >> 4).astype(np.float32) - 8.0
deq = np.concatenate([lo.reshape(n, nb, bl // 2), hi.reshape(n, nb, bl // 2)], axis=-1).reshape(n, nb * b... |
gemm_f32_bf16_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, compute-precision-only bf16 on NEON bfmmla: A[M,K]/B[K,N]/bias[N] are fp32 wire format; the baseline packers (kai_lhs_quant_pack_bf16p8x4_f32_neon, kai_rhs_quant_pack_kxn_bf16p12x4biasf32_f32_neon) truncate to bf16 internally, as in gemm_bf16_n512_k512 (the SME2 variant). M varies per workload. ... | false | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B": {"shape": ["K", "N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B, bias):
return (A.astype(np.float32) @ B.astype(np.float32) + bias.astype(np.float32)).astype(np.float32)
| |
gemm_fp32_n512_k512 | kleidiai | gemm | fc N=512 K=512 | true | kleidiai | true | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B": {"shape": ["N", "K"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return A @ B.T
|
gemm_fp32_sme2_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, full fp32 throughout (A[M,K], B[K,N] -- 'kxn' layout matching kai_rhs_pack_kxn_f32p16vlx1b_f32_f32_sme's native input layout, no transpose needed -- and bias[N]), f32 output. This definition exists to host a KleidiAI SME2 baseline (kai_matmul_clamp_f32_f32_f32p16vlx1b_1x16vl_sme2_mla) -- the SME... | true | kleidiai-sme2 | false | true | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B": {"shape": ["K", "N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B, bias):
return (A.astype(np.float32) @ B.astype(np.float32) + bias.astype(np.float32)).astype(np.float32)
|
gemm_ggml_q4_K_n1024_k2560 | e2e | gemm | qwen35 blk.N.attn_k.weight×8, blk.N.attn_v.weight×3: N=1024 K=2560, ggml Q4_K block rows (e2e, 0.6% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0059"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 1440}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n1024_k4096 | e2e | gemm | llama blk.N.attn_k.weight×32, blk.N.attn_v.weight×16: N=1024 K=4096, ggml Q4_K block rows (e2e, 2.5% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.0246"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 2304}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n14336_k4096 | e2e | gemm | llama blk.N.ffn_gate.weight×32, blk.N.ffn_up.weight×32: N=14336 K=4096, ggml Q4_K block rows (e2e, 45.8% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.4578"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 14336}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 2304}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n2560_k4096 | e2e | gemm | qwen35 blk.N.attn_output.weight×8: N=2560 K=4096, ggml Q4_K block rows (e2e, 1.7% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0173"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2560}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 2304}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n2560_k9216 | e2e | gemm | qwen35 blk.N.ffn_down.weight×16: N=2560 K=9216, ggml Q4_K block rows (e2e, 7.8% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0778"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2560}, "K": {"type": "const", "value": 9216}, "K_blk": {"type": "const", "value": 36}, "K_bytes": {"type": "const", "value": 5184}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n4096_k14336 | e2e | gemm | llama blk.N.ffn_down.weight×16: N=4096 K=14336, ggml Q4_K block rows (e2e, 11.5% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.1145"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 4096}, "K": {"type": "const", "value": 14336}, "K_blk": {"type": "const", "value": 56}, "K_bytes": {"type": "const", "value": 8064}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n4096_k2560 | e2e | gemm | qwen35 blk.N.attn_gate.weight×24: N=4096 K=2560, ggml Q4_K block rows (e2e, 5.2% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0519"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 4096}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 1440}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n4096_k4096 | e2e | gemm | llama blk.N.attn_output.weight×32, blk.N.attn_q.weight×32: N=4096 K=4096, ggml Q4_K block rows (e2e, 13.1% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.1308"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 4096}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 2304}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n8192_k2560 | e2e | gemm | qwen35 blk.N.attn_q.weight×8: N=8192 K=2560, ggml Q4_K block rows (e2e, 3.5% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0346"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 8192}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 1440}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q4_K_n9216_k2560 | e2e | gemm | qwen35 blk.N.ffn_gate.weight×32, blk.N.ffn_up.weight×32: N=9216 K=2560, ggml Q4_K block rows (e2e, 31.1% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.3112"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 9216}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 1440}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q5_K_n2560_k4096 | e2e | gemm | qwen35 blk.N.ssm_out.weight×24: N=2560 K=4096, ggml Q5_K block rows (e2e, 6.3% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0634"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2560}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 2816}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q5_K_n8192_k2560 | e2e | gemm | qwen35 blk.N.attn_qkv.weight×24: N=8192 K=2560, ggml Q5_K block rows (e2e, 12.7% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.1268"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 8192}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 1760}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def unpack_scales_k4(s12):
# ggml get_scale_min_k4 over the 12-byte packed field -> (sc, mn) [..., 8]
s12 = s12.astype(np.uint8)
sc = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
mn = np.empty(s12.shape[:-1] + (8,), dtype=np.float32)
for j in range(4):
sc[..., j] = ... | |
gemm_ggml_q6_K_n1024_k2560 | e2e | gemm | qwen35 blk.N.attn_v.weight×5: N=1024 K=2560, ggml Q6_K block rows (e2e, 0.4% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.0039"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 2100}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_ggml_q6_K_n1024_k4096 | e2e | gemm | llama blk.N.attn_v.weight×16: N=1024 K=4096, ggml Q6_K block rows (e2e, 1.2% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.0119"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 3360}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_ggml_q6_K_n128256_k4096 | e2e | gemm | llama output.weight×1: N=128256 K=4096, ggml Q6_K block rows (e2e, 9.3% of decode bytes) | false | false | false | 4 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.0933"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 128256}, "K": {"type": "const", "value": 4096}, "K_blk": {"type": "const", "value": 16}, "K_bytes": {"type": "const", "value": 3360}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_ggml_q6_K_n248320_k2560 | e2e | gemm | qwen35 token_embd.weight×1: N=248320 K=2560, ggml Q6_K block rows (e2e, 19.1% of decode bytes) | false | false | false | 4 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.1910"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 248320}, "K": {"type": "const", "value": 2560}, "K_blk": {"type": "const", "value": 10}, "K_bytes": {"type": "const", "value": 2100}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_ggml_q6_K_n2560_k9216 | e2e | gemm | qwen35 blk.N.ffn_down.weight×16: N=2560 K=9216, ggml Q6_K block rows (e2e, 11.3% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen3.5-4b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:qwen3.5-4b",
"e2e-share:0.1134"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2560}, "K": {"type": "const", "value": 9216}, "K_blk": {"type": "const", "value": 36}, "K_bytes": {"type": "const", "value": 7560}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_ggml_q6_K_n4096_k14336 | e2e | gemm | llama blk.N.ffn_down.weight×16: N=4096 K=14336, ggml Q6_K block rows (e2e, 16.7% of decode bytes) | false | false | false | 6 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"baseline-solution:llama.cpp",
"correctness:sqnr",
"e2e:llama-3.1-8b",
"e2e-share:0.1669"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 4096}, "K": {"type": "const", "value": 14336}, "K_blk": {"type": "const", "value": 56}, "K_bytes": {"type": "const", "value": 11760}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B": {"shape": ["N", "K_bytes"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def f16(b):
# little-endian fp16 bytes [..., 2] -> float32 [...]
return np.ascontiguousarray(b).view("<f2")[..., 0].astype(np.float32)
def dequant_ggml_q6_K(B):
# B: uint8 [N, K/256 * 210] rows of ggml block_q6_K
# {uint8 ql[128]; uint8 qh[64]; int8 scales[16]; fp16 d}
n_rows,... | |
gemm_i32_u8_sme2_n256_k512 | kleidiai | gemm | Integer GEMM, N=256 K=512: C[m,n] = sum_k A[m,k]*B[n,k] with A uint8 [M,K] and B uint8 [N,K], exact int32 accumulation, no scales or bias. The kernel's native output is int32; this repo's raw ABI always allocates float32 outputs, so the binding converts int32 to float32 (round-to-nearest, identical in reference and bas... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "uint8"}, "B": {"shape": ["N", "K"], "dtype": "uint8"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B):
return (A.astype(np.int64) @ B.astype(np.int64).T).astype(np.int32).astype(np.float32)
|
gemm_q4_k_m_n1024_k2048 | llama.cpp | gemm | expert ffn N=1024 K=2048 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 2048}, "K_half": {"type": "const", "value": 1024}, "K_sub": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_sub"], "dtype": "float16"}, "B_mins": {"shape": ["N", "K_sub"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
gemm_q4_k_m_n1408_k2048 | llama.cpp | gemm | expert ffn N=1408 K=2048 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1408}, "K": {"type": "const", "value": 2048}, "K_half": {"type": "const", "value": 1024}, "K_sub": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_sub"], "dtype": "float16"}, "B_mins": {"shape": ["N", "K_sub"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
gemm_q4_k_m_n2048_k1024 | llama.cpp | gemm | expert ffn N=2048 K=1024 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1024}, "K_half": {"type": "const", "value": 512}, "K_sub": {"type": "const", "value": 32}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_sub"], "dtype": "float16"}, "B_mins": {"shape": ["N", "K_sub"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
gemm_q4_k_m_n2048_k1536 | llama.cpp | gemm | expert ffn N=2048 K=1536 (K rounded up from 1408 to 1536, the next multiple of 256, since Q4_K requires the reduction dim divisible by 256; real GGML would fall back to Q5_0 for the unrounded 1408 shape) | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1536}, "K_half": {"type": "const", "value": 768}, "K_sub": {"type": "const", "value": 48}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_sub"], "dtype": "float16"}, "B_mins": {"shape": ["N", "K_sub"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
gemm_q4_k_m_n2048_k2048 | llama.cpp | gemm | expert ffn N=2048 K=2048 | true | llama.cpp | true | true | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 2048}, "K_half": {"type": "const", "value": 1024}, "K_sub": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "bfloat16"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_sub"], "dtype": "float16"}, "B_mins": {"shape": ["N", "K_sub"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
gemm_q8_0_n1024_k2048 | llama.cpp | gemm | expert ffn N=1024 K=2048 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1024}, "K": {"type": "const", "value": 2048}, "K_blk": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scales": {"shape": ["M", "K_blk"], "dtype": "float16"}, "B": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N", "K_blk"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scales, B, B_scales):
M = A.shape[0]; blk = 32
A_f = (A.reshape(M, -1, blk).astype(np.float32)
* A_scales.astype(np.float32)[:, :, np.newaxis]).reshape(M, 2048)
B_f = (B.reshape(1024, -1, blk).astype(np.float32)
* B_scales.astype(np.float32)[:, :, np.new... |
gemm_q8_0_n1408_k2048 | llama.cpp | gemm | expert ffn N=1408 K=2048 | true | llama.cpp | true | true | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 1408}, "K": {"type": "const", "value": 2048}, "K_blk": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scales": {"shape": ["M", "K_blk"], "dtype": "float16"}, "B": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N", "K_blk"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scales, B, B_scales):
M = A.shape[0]; blk = 32
A_f = (A.reshape(M, -1, blk).astype(np.float32)
* A_scales.astype(np.float32)[:, :, np.newaxis]).reshape(M, 2048)
B_f = (B.reshape(1408, -1, blk).astype(np.float32)
* B_scales.astype(np.float32)[:, :, np.new... |
gemm_q8_0_n2048_k1024 | llama.cpp | gemm | expert ffn N=2048 K=1024 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1024}, "K_blk": {"type": "const", "value": 32}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scales": {"shape": ["M", "K_blk"], "dtype": "float16"}, "B": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N", "K_blk"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scales, B, B_scales):
M = A.shape[0]; blk = 32
A_f = (A.reshape(M, -1, blk).astype(np.float32)
* A_scales.astype(np.float32)[:, :, np.newaxis]).reshape(M, 1024)
B_f = (B.reshape(2048, -1, blk).astype(np.float32)
* B_scales.astype(np.float32)[:, :, np.new... |
gemm_q8_0_n2048_k1408 | llama.cpp | gemm | expert ffn N=2048 K=1408 | true | llama.cpp | false | false | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 1408}, "K_blk": {"type": "const", "value": 44}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scales": {"shape": ["M", "K_blk"], "dtype": "float16"}, "B": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N", "K_blk"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scales, B, B_scales):
M = A.shape[0]; blk = 32
A_f = (A.reshape(M, -1, blk).astype(np.float32)
* A_scales.astype(np.float32)[:, :, np.newaxis]).reshape(M, 1408)
B_f = (B.reshape(2048, -1, blk).astype(np.float32)
* B_scales.astype(np.float32)[:, :, np.new... |
gemm_q8_0_n2048_k2048 | llama.cpp | gemm | attn proj N=2048 K=2048 | true | llama.cpp | true | true | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 2048}, "K": {"type": "const", "value": 2048}, "K_blk": {"type": "const", "value": 64}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scales": {"shape": ["M", "K_blk"], "dtype": "float16"}, "B": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N", "K_blk"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scales, B, B_scales):
M = A.shape[0]; blk = 32
A_f = (A.reshape(M, -1, blk).astype(np.float32)
* A_scales.astype(np.float32)[:, :, np.newaxis]).reshape(M, 2048)
B_f = (B.reshape(2048, -1, blk).astype(np.float32)
* B_scales.astype(np.float32)[:, :, np.new... |
gemm_qai4c32_n256_k512 | kleidiai | gemm | GEMM, N=256 K=512, weight-only-quantized ASYMMETRIC int4 with block length 32 (NEON i8mm): A is fp32, B ships as qai4c32 -- uint8 [N,K/2] with adjacent-pair nibbles (byte j holds k=2j in the low nibble, k=2j+1 in the high nibble), plus per-block fp32 scale [N,K/32] and per-block fp32 additive offset B_zeros [N,K/32] al... | false | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "B_zeros": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, B_zeros, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
s = np.repeat(B_scales.astype(np.float32), 32, axis=1)
... | |
gemm_qai4c32_sme2_n256_k512 | kleidiai | gemm | GEMM, N=256 K=512, weight-only-quantized ASYMMETRIC int4 with block length 32 (SME2): A is fp32, B ships as qai4c32 -- uint8 [N,K/2] with adjacent-pair nibbles (byte j holds k=2j in the low nibble, k=2j+1 in the high nibble), plus per-block fp32 scale [N,K/32] and per-block fp32 additive offset B_zeros [N,K/32] already... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "B_zeros": {"shape": ["N", "K_blocks"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, B_zeros, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
s = np.repeat(B_scales.astype(np.float32), 32, axis=1)
... |
gemm_qai8_qsi8cx_sme2_n256_k512 | kleidiai | gemm | Requantized int8 GEMM, N=256 K=512: A int8 [M,K] with per-tensor scale A_scale (symmetric, zero point fixed at 0); B int8 [N,K] with per-channel scale B_scales (symmetric); fp32 bias [N]; int32 accumulation A@B^T, scaled by A_scale*B_scales[n], plus bias, divided by C_scale, rounded to nearest even and clamped to [-128... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "S": {"type": "const", "value": 1}} | {"A": {"shape": ["M", "K"], "dtype": "int8"}, "A_scale": {"shape": ["S"], "dtype": "float32"}, "B_q8": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}, "C_scale": {"shape": ["S"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, A_scale, B_q8, B_scales, bias, C_scale):
acc = A.astype(np.int32) @ B_q8.astype(np.int32).T
real = acc.astype(np.float32) * (A_scale[0] * B_scales.astype(np.float32))[None, :] + bias.astype(np.float32)
q = np.rint(real / C_scale[0])
return np.clip(q, -128, 127).astype(np.... |
gemm_qai8dxp_qs4c32_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized block-wise int4 with dynamically int8-quantized activations (SVE): A and bias are fp32, B_q4 is uint8 [N,K/2] with adjacent-pair nibbles (byte j holds k=2j in the low nibble and k=2j+1 in the high nibble), zero_point=8, one bfloat16 scale per block of 32 along K (the only s... | true | kleidiai | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "bfloat16"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
s = np.repeat(B_scales.astype(np.float32), 32, axis=1)
B = deq... |
gemm_qai8dxp_qs4c32_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized block-wise int4 with dynamically int8-quantized activations (SME2): A and bias are fp32, B_q4 is uint8 [N,K/2] with adjacent-pair nibbles (byte j holds k=2j in the low nibble and k=2j+1 in the high nibble), zero_point=8, one bfloat16 scale per block of 32 along K (the only ... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "bfloat16"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
s = np.repeat(B_scales.astype(np.float32), 32, axis=1)
B = deq... |
gemm_qs4c32_n256_k512 | kleidiai | gemm | fc N=256 K=512, weight-only-quantized: A is fp32, B ships pre-quantized as qs4c32 (int4 nibble-packed, block length 32, zero_point=8, per-block f16 scale) exactly like KleidiAI's own qsi4c32 RHS format — this is the wire format, there is no fp32 B anywhere upstream, matching the gemm_q4_k_m_*/moe_q8_0_* convention (qua... | true | kleidiai | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dequant_qs4c32(B_q4, B_scales, bl=32):
n, k_half = B_q4.shape
num_blocks = k_half // (bl // 2)
lo = (B_q4 & 0x0F).astype(np.float32) - 8.0
hi = (B_q4 >> 4).astype(np.float32) - 8.0
lo = lo.reshape(n, num_blocks, bl // 2)
hi = hi.reshape(n, num_blocks, bl // 2)
deq = ... |
gemm_qs4c32_sme2_n256_k512 | kleidiai | gemm | GEMM, N=256 K=512, weight-only-quantized block-wise int4 (SME2): same wire format as gemm_qs4c32_n256_k512 -- A fp32, B_q4 uint8 [N,K/2] (qs4c32: block length 32, zero_point=8, byte i of each 16-byte block holds element i in the low nibble and element i+16 in the high nibble), per-block f16 scale; dequant via value=(ni... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}, "K_blocks": {"type": "const", "value": 16}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N", "K_blocks"], "dtype": "float16"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales):
n, k_half = B_q4.shape
bl = 32
nb = k_half // (bl // 2)
lo = (B_q4 & 0x0F).astype(np.float32) - 8.0
hi = (B_q4 >> 4).astype(np.float32) - 8.0
deq = np.concatenate([lo.reshape(n, nb, bl // 2), hi.reshape(n, nb, bl // 2)], axis=-1).reshape(n, nb * b... |
gemm_qs4cx_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, weight-only-quantized per-channel int4: same wire format as gemm_qs4cx_sme2_n256_k512 -- A and bias fp32, B as qs4cx uint8 [N,K/2] with adjacent-pair nibbles (byte j holds k=2j low, k=2j+1 high), zero_point=8, one fp32 scale per output channel; dequant via value=(nibble-8)*scale. M varies per wo... | true | kleidiai | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q4, B_scales, bias):
n, k_half = B_q4.shape
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = (B_q4 & 0x0F).astype(np.float32) - 8.0
deq[:, 1::2] = (B_q4 >> 4).astype(np.float32) - 8.0
B = deq * B_scales.astype(np.float32)[:, None]
return (A.astyp... |
gemm_qs4cx_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized with PER-CHANNEL (not per-block, unlike gemm_qs4c32_*) int4 granularity: A and bias are fp32, B ships pre-quantized as qs4cx -- one scale per output channel (row), covering the full K dimension, no block subdivision. Nibble packing is simple adjacent-pair (byte j holds k=2j... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_half": {"type": "const", "value": 256}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q4": {"shape": ["N", "K_half"], "dtype": "uint8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def dequant_qs4cx(B_q4, B_scales):
n, k_half = B_q4.shape
lo = (B_q4 & 0x0F).astype(np.float32) - 8.0
hi = (B_q4 >> 4).astype(np.float32) - 8.0
deq = np.empty((n, k_half * 2), dtype=np.float32)
deq[:, 0::2] = lo
deq[:, 1::2] = hi
return deq * B_scales.astype(np.float32)[... |
gemm_qs8cx_n512_k512 | kleidiai | gemm | GEMM+bias, N=512 K=512, weight-only-quantized per-channel int8: A and bias are fp32, B ships pre-quantized as qsi8cx -- int8 [N,K] (row-major, one row per output channel) plus one fp32 scale per output channel; dequant via value=q*scale, no zero point. LHS is dynamically quantized per row by the baseline (qai8dxp, asym... | true | kleidiai | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 512}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q8": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q8, B_scales, bias):
B = B_q8.astype(np.float32) * B_scales.astype(np.float32)[:, None]
return (A.astype(np.float32) @ B.T + bias.astype(np.float32)).astype(np.float32)
|
gemm_qs8cx_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized per-channel int8 (SME2): A and bias are fp32, B ships pre-quantized as qsi8cx -- int8 [N,K] (row-major, one row per output channel) plus one fp32 scale per output channel; dequant via value=q*scale, no zero point. LHS is dynamically quantized per row by the baseline (qai8dx... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q8": {"shape": ["N", "K"], "dtype": "int8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q8, B_scales, bias):
B = B_q8.astype(np.float32) * B_scales.astype(np.float32)[:, None]
return (A.astype(np.float32) @ B.T + bias.astype(np.float32)).astype(np.float32)
|
gemm_qsu2cx_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized per-channel 2-bit (NEON dotprod): A and bias are fp32, B ships pre-quantized as qsu2cx -- uint8 [N,K/4], four 2-bit values per byte (byte j holds k=4j in bits 0-1, k=4j+1 in bits 2-3, k=4j+2 in bits 4-5, k=4j+3 in bits 6-7), zero_point=2, one fp32 scale per output channel; ... | false | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_q": {"type": "const", "value": 128}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q2": {"shape": ["N", "K_q"], "dtype": "uint8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q2, B_scales, bias):
n, k_q = B_q2.shape
deq = np.empty((n, k_q * 4), dtype=np.float32)
for j in range(4):
deq[:, j::4] = ((B_q2 >> (2 * j)) & 0x03).astype(np.float32) - 2.0
B = deq * B_scales.astype(np.float32)[:, None]
return (A.astype(np.float32) @ B.T + ... | |
gemm_qsu2cx_sme2_n256_k512 | kleidiai | gemm | GEMM+bias, N=256 K=512, weight-only-quantized per-channel 2-bit (SME2): A and bias are fp32, B ships pre-quantized as qsu2cx -- uint8 [N,K/4], four 2-bit values per byte (byte j holds k=4j in bits 0-1, k=4j+1 in bits 2-3, k=4j+2 in bits 4-5, k=4j+3 in bits 6-7), zero_point=2, one fp32 scale per output channel; dequant ... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai",
"correctness:sqnr"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "K_q": {"type": "const", "value": 128}} | {"A": {"shape": ["M", "K"], "dtype": "float32"}, "B_q2": {"shape": ["N", "K_q"], "dtype": "uint8"}, "B_scales": {"shape": ["N"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B_q2, B_scales, bias):
n, k_q = B_q2.shape
deq = np.empty((n, k_q * 4), dtype=np.float32)
for j in range(4):
deq[:, j::4] = ((B_q2 >> (2 * j)) & 0x03).astype(np.float32) - 2.0
B = deq * B_scales.astype(np.float32)[:, None]
return (A.astype(np.float32) @ B.T + ... |
gemm_u8_f32_sme2_n256_k512 | kleidiai | gemm | Quantized-input GEMM, N=256 K=512: C[m,n] = float(sum_k A[m,k]*B[n,k]) * C_scale[0] + bias[n] with A uint8 [M,K], B uint8 [N,K], exact int32 accumulation then converted to float32, scaled by one global fp32 scale and offset by a per-column fp32 bias. C_scale is a one-element tensor (axis S=1) because the raw ABI passes... | true | kleidiai-sme2 | false | false | 13 | [
"baseline-kleidiai"
] | [
"status:active",
"baseline-solution:kleidiai"
] | {"M": {"type": "var"}, "N": {"type": "const", "value": 256}, "K": {"type": "const", "value": 512}, "S": {"type": "const", "value": 1}} | {"A": {"shape": ["M", "K"], "dtype": "uint8"}, "B": {"shape": ["N", "K"], "dtype": "uint8"}, "C_scale": {"shape": ["S"], "dtype": "float32"}, "bias": {"shape": ["N"], "dtype": "float32"}} | {"C": {"shape": ["M", "N"], "dtype": "float32"}} | [] | import numpy as np
def run(A, B, C_scale, bias):
acc = (A.astype(np.int64) @ B.astype(np.int64).T).astype(np.int32).astype(np.float32)
return (acc * C_scale.astype(np.float32)[0] + bias.astype(np.float32)).astype(np.float32)
|
gqa_bf16_h32_d128_kvh8 | llama.cpp | gqa | Causal GQA h=32 d=128 kv=8 (n_gqa=4) | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:llama-3.1-8b",
"model:mistral-7b-v0.1",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "S": {"type": "var"}, "n_heads": {"type": "const", "value": 32}, "head_dim": {"type": "const", "value": 128}, "kv_heads": {"type": "const", "value": 8}} | {"Q": {"shape": ["M", "n_heads", "head_dim"], "dtype": "bfloat16"}, "K": {"shape": ["S", "kv_heads", "head_dim"], "dtype": "bfloat16"}, "V": {"shape": ["S", "kv_heads", "head_dim"], "dtype": "bfloat16"}} | {"output": {"shape": ["M", "n_heads", "head_dim"], "dtype": "float32"}} | [] | import numpy as np
def run(Q, K, V):
Q = Q.astype(np.float32)
K = K.astype(np.float32)
V = V.astype(np.float32)
M, n_heads, head_dim = Q.shape
S, kv_heads, _ = K.shape
gqa_ratio = n_heads // kv_heads
K_e = np.repeat(K, gqa_ratio, axis=1)
V_e = np.repeat(V, gqa_ratio, axis=1)
scal... |
mha_bf16_h16_d128_kvh16 | llama.cpp | mha | MHA h=16 d=128 kv=16 | true | llama.cpp | true | true | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "S": {"type": "var"}, "n_heads": {"type": "const", "value": 16}, "head_dim": {"type": "const", "value": 128}, "kv_heads": {"type": "const", "value": 16}} | {"Q": {"shape": ["M", "n_heads", "head_dim"], "dtype": "bfloat16"}, "K": {"shape": ["S", "kv_heads", "head_dim"], "dtype": "bfloat16"}, "V": {"shape": ["S", "kv_heads", "head_dim"], "dtype": "bfloat16"}} | {"output": {"shape": ["M", "n_heads", "head_dim"], "dtype": "float32"}} | [] | import numpy as np
def run(Q, K, V):
Q = Q.astype(np.float32)
K = K.astype(np.float32)
V = V.astype(np.float32)
M = Q.shape[0]; S = K.shape[0]
K_e = K
V_e = V
Qt = Q.transpose(1, 0, 2)
Kt = K_e.transpose(1, 0, 2)
Vt = V_e.transpose(1, 0, 2)
scores = np.matmul(Qt, Kt.transpose(0, ... |
mla_decode_bf16_h16_lora512_rope64_v128 | llama.cpp | mla_decode | Causal MLA decode (weight-absorbed/compressed form) h=16 kv_lora_rank=512 qk_rope=64 v_head_dim=128 (c_q=576, MQA-style shared K/V latent, decompressed via v_mla) | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:deepseek-v3",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "S": {"type": "var"}, "n_heads": {"type": "const", "value": 16}, "kv_lora_rank": {"type": "const", "value": 512}, "qk_rope_head_dim": {"type": "const", "value": 64}, "qk_nope_head_dim": {"type": "const", "value": 128}, "v_head_dim": {"type": "const", "value": 128}, "c_q": {"type": "const", "value... | {"Q": {"shape": ["M", "n_heads", "c_q"], "dtype": "bfloat16"}, "K": {"shape": ["S", "c_q"], "dtype": "bfloat16"}, "V": {"shape": ["S", "kv_lora_rank"], "dtype": "bfloat16"}, "v_mla": {"shape": ["n_heads", "v_head_dim", "kv_lora_rank"], "dtype": "bfloat16"}} | {"output": {"shape": ["M", "n_heads", "v_head_dim"], "dtype": "float32"}} | [] | import numpy as np
def run(Q, K, V, v_mla):
Q = Q.astype(np.float32)
K = K.astype(np.float32)
V = V.astype(np.float32)
v_mla = v_mla.astype(np.float32)
M = Q.shape[0]
S = K.shape[0]
# softmax scale uses the true un-absorbed head dim (qk_nope+qk_rope=192),
# not the absorbed compute di... |
mla_prefill_bf16_h16_qk192_vo128 | llama.cpp | mla_prefill | Causal MLA prefill (decompressed/naive form) h=16 qk_dim=192 (qk_nope=128+qk_rope=64) vo_dim=128, num_kv_heads==num_qo_heads | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:deepseek-v3",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "S": {"type": "var"}, "n_heads": {"type": "const", "value": 16}, "qk_dim": {"type": "const", "value": 192}, "vo_dim": {"type": "const", "value": 128}} | {"Q": {"shape": ["M", "n_heads", "qk_dim"], "dtype": "bfloat16"}, "K": {"shape": ["S", "n_heads", "qk_dim"], "dtype": "bfloat16"}, "V": {"shape": ["S", "n_heads", "vo_dim"], "dtype": "bfloat16"}} | {"output": {"shape": ["M", "n_heads", "vo_dim"], "dtype": "float32"}} | [] | import numpy as np
def run(Q, K, V):
Q = Q.astype(np.float32)
K = K.astype(np.float32)
V = V.astype(np.float32)
M = Q.shape[0]
S = K.shape[0]
scale = 0.07216878364870323
logits = np.einsum('mhd,shd->hms', Q, K) * scale
delta = S - M
q_pos = np.arange(M)
kv_pos = np.arange(S)
... |
moe_bf16_e60_k4_d2048_ff1408 | llama.cpp | moe | MoE e=60 k=4 d=2048 ff=1408 | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1408}, "n_expert": {"type": "const", "value": 60}, "n_expert_used": {"type": "const", "value": 4}} | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "bfloat16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "bfloat16"}, "gate_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "bfloat16"}, "up_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "bfloat16"}, "down_proj": {"shape"... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def run(hidden_states, router_weight, gate_proj, up_proj, down_proj):
hidden_states = hidden_states.astype(np.float32)
router_weight = router_weight.astype(np.float32)
gate_proj = gate_proj.astype(np.float32)
up_proj = up_proj.astype(np.float32)
down_proj = down_proj.astype(np.flo... |
moe_bf16_e64_k8_d2048_ff1024 | llama.cpp | moe | MoE e=64 k=8 d=2048 ff=1024 | true | llama.cpp | true | true | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1024}, "n_expert": {"type": "const", "value": 64}, "n_expert_used": {"type": "const", "value": 8}} | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "bfloat16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "bfloat16"}, "gate_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "bfloat16"}, "up_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "bfloat16"}, "down_proj": {"shape"... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def run(hidden_states, router_weight, gate_proj, up_proj, down_proj):
hidden_states = hidden_states.astype(np.float32)
router_weight = router_weight.astype(np.float32)
gate_proj = gate_proj.astype(np.float32)
up_proj = up_proj.astype(np.float32)
down_proj = down_proj.astype(np.flo... |
moe_q4_k_m_e60_k4_d2048_ff1536 | llama.cpp | moe | MoE q4_k_m e=60 k=4 d=2048 ff=1536 (ff rounded up from 1408 to 1536, the next multiple of 256, since Q4_K requires the reduction dim divisible by 256; real GGML would fall back to Q5_0 for the unrounded 1408 shape on down_proj) | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1536}, "n_expert": {"type": "const", "value": 60}, "n_expert_used": {"type": "const", "value": 4}, "n_embd_half": {"type": "const", "value": 1024}, "n_embd_sub": {"type": "const", "value": 64}, "n_ff_half": {"ty... | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "bfloat16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "float32"}, "gate_proj_q4": {"shape": ["n_expert", "n_ff", "n_embd_half"], "dtype": "uint8"}, "gate_proj_scales": {"shape": ["n_expert", "n_ff", "n_embd_sub"], "dtype": "float16"}, "gate... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
moe_q4_k_m_e64_k8_d2048_ff1024 | llama.cpp | moe | MoE q4_k_m e=64 k=8 d=2048 ff=1024 | true | llama.cpp | true | true | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1024}, "n_expert": {"type": "const", "value": 64}, "n_expert_used": {"type": "const", "value": 8}, "n_embd_half": {"type": "const", "value": 1024}, "n_embd_sub": {"type": "const", "value": 64}, "n_ff_half": {"ty... | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "bfloat16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "float32"}, "gate_proj_q4": {"shape": ["n_expert", "n_ff", "n_embd_half"], "dtype": "uint8"}, "gate_proj_scales": {"shape": ["n_expert", "n_ff", "n_embd_sub"], "dtype": "float16"}, "gate... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def dq4k(q4, scales, mins):
K = q4.shape[-1] * 2
lo = (q4 & 0x0F).astype(np.float32)
hi = (q4 >> 4).astype(np.float32)
nib = np.empty(q4.shape[:-1] + (K,), dtype=np.float32)
nib[..., 0::2] = lo
nib[..., 1::2] = hi
s = np.repeat(scales.astype(np.float32), 32, axis=-1)
... |
moe_q8_0_e60_k4_d2048_ff1408 | llama.cpp | moe | MoE q8_0 e=60 k=4 d=2048 ff=1408 | true | llama.cpp | false | false | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1408}, "n_expert": {"type": "const", "value": 60}, "n_expert_used": {"type": "const", "value": 4}, "n_embd_blk": {"type": "const", "value": 64}, "n_ff_blk": {"type": "const", "value": 44}} | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "int8"}, "hs_scales": {"shape": ["n_tokens", "n_embd_blk"], "dtype": "float16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "float32"}, "gate_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "int8"}, "gate_scales": {"shape": ["n_expe... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def run(hidden_states, hs_scales, router_weight,
gate_proj, gate_scales, up_proj, up_scales,
down_proj, down_scales):
T = hidden_states.shape[0]; blk = 32
def dq(x, s):
r, K = x.shape
return (x.reshape(r, -1, blk).astype(np.float32)
* s.astype(n... |
moe_q8_0_e64_k8_d2048_ff1024 | llama.cpp | moe | MoE q8_0 e=64 k=8 d=2048 ff=1024 | true | llama.cpp | true | true | 20 | [
"baseline-llamacpp"
] | [
"status:active",
"model:olmoe-1b-7b",
"baseline-solution:llama.cpp",
"correctness:sqnr"
] | {"n_tokens": {"type": "var"}, "n_embd": {"type": "const", "value": 2048}, "n_ff": {"type": "const", "value": 1024}, "n_expert": {"type": "const", "value": 64}, "n_expert_used": {"type": "const", "value": 8}, "n_embd_blk": {"type": "const", "value": 64}, "n_ff_blk": {"type": "const", "value": 32}} | {"hidden_states": {"shape": ["n_tokens", "n_embd"], "dtype": "int8"}, "hs_scales": {"shape": ["n_tokens", "n_embd_blk"], "dtype": "float16"}, "router_weight": {"shape": ["n_expert", "n_embd"], "dtype": "float32"}, "gate_proj": {"shape": ["n_expert", "n_ff", "n_embd"], "dtype": "int8"}, "gate_scales": {"shape": ["n_expe... | {"output": {"shape": ["n_tokens", "n_embd"], "dtype": "float32"}} | [] | import numpy as np
def run(hidden_states, hs_scales, router_weight,
gate_proj, gate_scales, up_proj, up_scales,
down_proj, down_scales):
T = hidden_states.shape[0]; blk = 32
def dq(x, s):
r, K = x.shape
return (x.reshape(r, -1, blk).astype(np.float32)
* s.astype(n... |
pooling_fp32_global_avg | ncnn | pooling | global average pooling | true | ncnn | true | true | 20 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "C": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}} | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}} | {"output": {"shape": ["N", "C"], "dtype": "float32"}} | [] | import numpy as np
def run(input):
return input.mean(axis=(-2, -1))
|
pooling_fp32_max_kh2_kw2_sh2_sw2_p0 | ncnn | pooling | 2D max pool 2x2 stride=(2,2) dilation=(1,1) pad=(0,0). C varies per workload. | true | ncnn | false | false | 6 | [
"baseline-ncnn"
] | [
"status:active",
"model:vgg16",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "Kh": {"type": "const", "value": 2}, "Kw": {"type": "const", "value": 2}, "Sh": {"type": "const", "value": 2}, "Sw": {"... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input):
x = torch.from_numpy(input)
return F.max_pool2d(x, kernel_size=(2, 2), stride=(2, 2),
padding=(0, 0), dilation=(1, 1)).numpy()
|
pooling_fp32_max_kh3_kw3_sh1_sw1_p1 | ncnn | pooling | 2D max pool 3x3 stride=(1,1) dilation=(1,1) pad=(1,1). C varies per workload. | true | ncnn | false | false | 6 | [
"baseline-ncnn"
] | [
"status:active",
"model:googlenet",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "const", "value": 1}, "Sw": {"... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input):
x = torch.from_numpy(input)
return F.max_pool2d(x, kernel_size=(3, 3), stride=(1, 1),
padding=(1, 1), dilation=(1, 1)).numpy()
|
pooling_fp32_max_kh3_kw3_sh2_sw2_p0 | ncnn | pooling | 2D max pool 3x3 stride=(2,2) dilation=(1,1) pad=(0,0). C varies per workload. | true | ncnn | false | false | 6 | [
"baseline-ncnn"
] | [
"status:active",
"model:alexnet",
"model:googlenet",
"model:squeezenet1_1",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "const", "value": 2}, "Sw": {"... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input):
x = torch.from_numpy(input)
return F.max_pool2d(x, kernel_size=(3, 3), stride=(2, 2),
padding=(0, 0), dilation=(1, 1)).numpy()
|
pooling_fp32_max_kh3_kw3_sh2_sw2_p1 | ncnn | pooling | 2D max pool 3x3 stride=(2,2) dilation=(1,1) pad=(1,1). C varies per workload. | true | ncnn | true | true | 11 | [
"baseline-ncnn"
] | [
"status:active",
"model:resnet50",
"baseline-solution:ncnn"
] | {"N": {"type": "var"}, "H": {"type": "var", "parent": "N"}, "W": {"type": "var", "parent": "N"}, "H_out": {"type": "var", "parent": "N"}, "W_out": {"type": "var", "parent": "N"}, "C": {"type": "var"}, "Kh": {"type": "const", "value": 3}, "Kw": {"type": "const", "value": 3}, "Sh": {"type": "const", "value": 2}, "Sw": {"... | {"input": {"shape": ["N", "C", "H", "W"], "dtype": "float32"}} | {"output": {"shape": ["N", "C", "H_out", "W_out"], "dtype": "float32"}} | ["H_out == (H + 2*pad_top - Dh*(Kh-1) - 1) // Sh + 1", "W_out == (W + 2*pad_left - Dw*(Kw-1) - 1) // Sw + 1"] | import torch
import torch.nn.functional as F
def run(input):
x = torch.from_numpy(input)
return F.max_pool2d(x, kernel_size=(3, 3), stride=(2, 2),
padding=(1, 1), dilation=(1, 1)).numpy()
|
rms_norm_fp32_d2048 | llama.cpp | rms_norm | RMSNorm D=2048 | true | llama.cpp | true | true | 24 | [
"baseline-llamacpp"
] | [
"status:active",
"model:qwen1.5-moe-a2.7b",
"baseline-solution:llama.cpp"
] | {"M": {"type": "var"}, "D": {"type": "const", "value": 2048}} | {"x": {"shape": ["M", "D"], "dtype": "float32"}, "weight": {"shape": ["D"], "dtype": "float32"}} | {"output": {"shape": ["M", "D"], "dtype": "float32"}} | [] | import numpy as np
def run(x, weight):
x = x.astype(np.float32)
weight = weight.astype(np.float32)
rms = np.sqrt(np.mean(x ** 2, axis=-1, keepdims=True) + 1e-6)
return (x / rms) * weight
|
loop_001 | simd-loop | loop_001 | Compute the FP32 dot product of two float arrays | true | simd-loop | true | true | 10 | [
"baseline-simd-loop-sme2",
"baseline-simd-loop-sve",
"baseline-simd-loop-sve2"
] | [
"simd-loop",
"sme2-kernel:streaming-sve"
] | {"N": {"type": "var", "description": "Array length"}} | {"a": {"shape": ["N"], "dtype": "float32"}, "b": {"shape": ["N"], "dtype": "float32"}} | {"res": {"shape": null, "dtype": "float32", "description": "Scalar result"}} | [] | import numpy as np
def run(a, b):
return np.float32(
np.dot(a.astype(np.float64), b.astype(np.float64)))
|
loop_002 | simd-loop | loop_002 | Compute the integer dot product of two uint32 arrays | true | simd-loop | true | true | 10 | [
"baseline-simd-loop-sme2",
"baseline-simd-loop-sve",
"baseline-simd-loop-sve2"
] | [
"simd-loop",
"sme2-kernel:streaming-sve"
] | {"N": {"type": "var", "description": "Array length"}} | {"a": {"shape": ["N"], "dtype": "int32"}, "b": {"shape": ["N"], "dtype": "int32"}} | {"res": {"shape": null, "dtype": "uint32", "description": "Scalar result"}} | [] | import numpy as np
def run(a, b):
return np.uint32(
np.sum(a.astype(np.uint64) * b.astype(np.uint64),
dtype=np.uint64))
|
loop_003 | simd-loop | loop_003 | Compute the FP64 dot product of two double arrays | true | simd-loop | true | true | 10 | [
"baseline-simd-loop-sme2",
"baseline-simd-loop-sve",
"baseline-simd-loop-sve2"
] | [
"simd-loop",
"sme2-kernel:streaming-sve"
] | {"N": {"type": "var", "description": "Array length"}} | {"a": {"shape": ["N"], "dtype": "float64"}, "b": {"shape": ["N"], "dtype": "float64"}} | {"res": {"shape": null, "dtype": "float64", "description": "Scalar result"}} | [] | import numpy as np
def run(a, b):
return np.float64(np.dot(a, b))
|
loop_004 | simd-loop | loop_004 | Compute the integer dot product of two uint64 arrays | true | simd-loop | false | false | 10 | [
"baseline-simd-loop-sme2",
"baseline-simd-loop-sve",
"baseline-simd-loop-sve2"
] | [
"simd-loop",
"sme2-kernel:streaming-sve"
] | {"N": {"type": "var", "description": "Array length"}} | {"a": {"shape": ["N"], "dtype": "int64"}, "b": {"shape": ["N"], "dtype": "int64"}} | {"res": {"shape": null, "dtype": "uint64", "description": "Scalar result"}} | [] | import numpy as np
def run(a, b):
return np.uint64(
np.sum(a.astype(np.uint64) * b.astype(np.uint64),
dtype=np.uint64))
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.