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
loop_005
simd-loop
loop_005
Compute the length of many short null-terminated strings
false
false
false
10
[]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Buffer length (bytes)"}}
{"p": {"shape": ["N"], "dtype": "uint8"}}
{"checksum": {"shape": null, "dtype": "uint32", "description": "Scalar checksum"}}
[]
import numpy as np def run(p): b = p; n = len(b); i = 0; res = 0 while i < n: j = i while j < n and int(b[j]) != 0: j += 1 length = j - i; i = j + 1 res = (res + 1) & 0xffffffff res ^= ((length % 0xffff) << 16) & 0xffffffff res &= 0xffffffff return np.uint32(...
loop_006
simd-loop
loop_006
Compute the length of many long null-terminated strings
false
false
false
10
[]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Buffer length (bytes)"}}
{"p": {"shape": ["N"], "dtype": "uint8"}}
{"checksum": {"shape": null, "dtype": "uint32", "description": "Scalar checksum"}}
[]
import numpy as np def run(p): b = p; n = len(b); i = 0; res = 0 while i < n: j = i while j < n and int(b[j]) != 0: j += 1 length = j - i; i = j + 1 res = (res + 1) & 0xffffffff res ^= ((length % 0xffff) << 16) & 0xffffffff res &= 0xffffffff return np.uint32(...
loop_008
simd-loop
loop_008
Sum a double array with exact scalar FP ordering — result must be bit-identical to sequential scalar addition
true
simd-loop
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"a": {"shape": ["N"], "dtype": "float64"}}
{"res": {"shape": null, "dtype": "float64", "description": "Scalar result"}}
[]
import numpy as np def run(a): return np.float64(np.sum(a))
loop_010
simd-loop
loop_010
Find the last active element of an FP array under a computed predicate
false
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": "float32"}}
{"res": {"shape": null, "dtype": "int32", "description": "Scalar result"}}
[]
import numpy as np def run(a): any_neg = bool(np.any(a < 0)) all_neg = bool(np.all(a < 0)) return np.int32(1 if all_neg else (2 if any_neg else 3))
loop_024
simd-loop
loop_024
Sum of absolute differences between two byte arrays, accumulated into a uint32
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": "int8"}, "b": {"shape": ["N"], "dtype": "int8"}}
{"res": {"shape": null, "dtype": "uint32", "description": "Scalar result"}}
[]
import numpy as np def run(a, b): return np.uint32( np.sum(np.abs(a.astype(np.int32) - b.astype(np.int32)), dtype=np.uint64))
loop_027
simd-loop
loop_027
Compute element-wise square root of an FP32 array
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"}}
{"input": {"shape": ["N"], "dtype": "float32"}}
{"output": {"shape": ["N"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(input): return np.sqrt(input.astype(np.float64)).astype(np.float32)
loop_028
simd-loop
loop_028
Compute element-wise fast approximate reciprocal division of FP64 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"}}
{"input1": {"shape": ["N"], "dtype": "float64"}, "input2": {"shape": ["N"], "dtype": "float64"}}
{"output": {"shape": ["N"], "dtype": "float64", "description": "Output array"}}
[]
import numpy as np def run(input1, input2): return input1 / input2
loop_029
simd-loop
loop_029
Scale each FP64 element by an integer power of two
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"}}
{"input": {"shape": ["N"], "dtype": "float64"}, "scale": {"shape": ["N"], "dtype": "int64"}}
{"output": {"shape": ["N"], "dtype": "float64", "description": "Output array"}}
[]
import numpy as np def run(input, scale): return np.ldexp(input, scale.astype(np.int32))
loop_032
simd-loop
loop_032
Solve a step of a banded linear system with non-unit-strided coefficient access
false
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"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): lw = 0 res = np.float64(0.0) for j in range(4, len(b), 5): res -= a[lw] * b[j] lw += 1 return np.float64(res)
loop_033
simd-loop
loop_033
Compute FP64 inner product of two 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": "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_034
simd-loop
loop_034
Compare many short null-terminated strings for equality
false
false
false
10
[]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Buffer length (bytes)"}}
{"a": {"shape": ["N"], "dtype": "uint8"}, "b": {"shape": ["N"], "dtype": "uint8"}}
{"checksum": {"shape": null, "dtype": "uint32", "description": "Scalar checksum"}}
[]
import numpy as np def run(a, b): n = len(a); res = 0; cnt = 0; length = 13; off = 0 while off < n: k = off while k < n and a[k] == b[k] and int(a[k]) != 0: k += 1 av = int(a[k]) if k < n else 0 bv = int(b[k]) if k < n else 0 r = av - bv cmp = 2 if r > 0 else (3 ...
loop_035
simd-loop
loop_035
Element-wise addition of two arrays with arbitrary length (non-multiple-of-vector-width)
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"}}
{"c": {"shape": ["N"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return a + b
loop_037
simd-loop
loop_037
Element-wise complex multiplication of two FP32 complex-number arrays (interleaved re/im)
true
simd-loop
true
true
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"size": {"type": "var", "description": "axis size"}, "cdim": {"type": "const", "value": 2, "description": "const cdim"}}
{"a0": {"shape": ["size", "cdim"], "dtype": "float32"}, "b0": {"shape": ["size", "cdim"], "dtype": "float32"}}
{"c0": {"shape": ["size", "cdim"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(a0, b0): ar, ai = a0[:, 0], a0[:, 1] br, bi = b0[:, 0], b0[:, 1] cr = ar * br - ai * bi ci = ar * bi + ai * br return np.stack([cr, ci], axis=1).astype(np.float32)
loop_038
simd-loop
loop_038
1D convolution of an FP16 signal with an FP16 filter kernel
true
simd-loop
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"dim": {"type": "var", "description": "axis dim"}}
{"a": {"shape": ["dim", "dim"], "dtype": "float16"}, "b": {"shape": ["dim", "dim"], "dtype": "float16"}}
{"c": {"shape": ["dim", "dim"], "dtype": "float16", "description": "Output array"}}
[]
import numpy as np def run(a, b): dim = a.shape[0] c = np.zeros((dim, dim), dtype=np.float16) if dim >= 2: k = np.float16(0.25) s0 = a[:-1, :-1]; s1 = a[:-1, 1:]; s2 = a[1:, :-1]; s3 = a[1:, 1:] r = (b[:-1, :-1] + s0 * k).astype(np.float16) r = (r + s1 * k).astype(np.float16...
loop_101
simd-loop
loop_101
Upscale a pixel buffer by splitting each element into its high and low halves
false
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"n": {"type": "var", "description": "axis n"}, "out_len": {"type": "var", "description": "axis out_len"}}
{"b": {"shape": ["n"], "dtype": "uint8"}}
{"a": {"shape": ["out_len"], "dtype": "uint8", "description": "Output array"}}
[]
import numpy as np def run(b): n = b.shape[0] a = np.zeros(2 * (n - 1), dtype=np.uint8) if n >= 2: s1 = b[:-1].astype(np.uint16) s2 = b[1:].astype(np.uint16) a[0::2] = ((3 * s1 + s2 + 2) >> 2).astype(np.uint8) a[1::2] = ((3 * s2 + s1 + 2) >> 2).astype(np.uint8) return a
loop_102
simd-loop
loop_102
Count the frequency of each byte value in a large buffer (histogram)
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"num_records": {"type": "var", "description": "axis num_records"}, "histogram_size": {"type": "const", "value": 128, "description": "const histogram_size"}}
{"records": {"shape": ["num_records"], "dtype": "uint32"}}
{"histogram": {"shape": ["histogram_size"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(records): return np.bincount(records.astype(np.int64), minlength=128)[:128].astype(np.uint32)
loop_103
simd-loop
loop_103
Find all whitespace character positions in a byte string
true
simd-loop
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Buffer length (bytes)"}}
{"p": {"shape": ["N"], "dtype": "uint8"}}
{"checksum": {"shape": null, "dtype": "int32", "description": "Scalar checksum"}}
[]
import numpy as np _WS = {32, 10, 13, 9} def run(p): b = p; n = len(b); i = 0 while i < n and int(b[i]) in _WS: i += 1 count = 0 while i < n: count += 1 while i < n and int(b[i]) not in _WS: i += 1 while i < n and int(b[i]) in _WS: i += 1 return np.int32(count)
loop_104
simd-loop
loop_104
Compute byte-value frequency histogram using segmented counting
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"n": {"type": "var", "description": "axis n"}, "histogram_size": {"type": "const", "value": 256, "description": "const histogram_size"}}
{"data": {"shape": ["n"], "dtype": "uint8"}}
{"histogram": {"shape": ["histogram_size"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(data): return np.bincount(data.astype(np.int64), minlength=256)[:256].astype(np.uint32)
loop_105
simd-loop
loop_105
Sum adjacent FP value pairs in a cascading pairwise reduction
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.sum(a.astype(np.float64)))
loop_106
simd-loop
loop_106
Partition a vector by bit flag, concentrating set-bit elements to one side
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["n"], "dtype": "uint32"}}
{"b": {"shape": ["n"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np _M = 0xFFFFFFFF def _popcount(x): return bin(x & _M).count('1') def _compress(x, m): x &= m mk = (~m << 1) & _M for i in range(5): mp = (mk ^ (mk << 1)) & _M mp = (mp ^ (mp << 2)) & _M mp = (mp ^ (mp << 4)) & _M mp = (mp ^ (mp << 8)) & _M mp ...
loop_108
simd-loop
loop_108
Deinterleave RGBA pixel data and accumulate channel values with bit shifts
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"}}
{"rgba": {"shape": ["N"], "dtype": "uint32"}}
{"y": {"shape": ["N"], "dtype": "uint8", "description": "Output array"}}
[]
import numpy as np def run(rgba): u = rgba.view(np.uint32) y = (u >> 26).astype(np.uint16) y += ((u >> 17) & np.uint32(0x7f)).astype(np.uint16) y += ((u >> 19) & np.uint32(0x1f)).astype(np.uint16) y += ((u >> 11) & np.uint32(0x1f)).astype(np.uint16) return y.astype(np.uint8)
loop_109
simd-loop
loop_109
Element-wise addition of complex numbers stored as interleaved uint32 (re, im) pairs
true
simd-loop
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"size": {"type": "var", "description": "axis size"}, "cdim": {"type": "const", "value": 2, "description": "const cdim"}}
{"a0": {"shape": ["size", "cdim"], "dtype": "uint32"}, "b0": {"shape": ["size", "cdim"], "dtype": "uint32"}}
{"c0": {"shape": ["size", "cdim"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np _M = np.uint64(0xffffffff) def run(a0, b0): cr = (a0[:, 0].astype(np.uint64) - b0[:, 1].astype(np.uint64)) & _M ci = (a0[:, 1].astype(np.uint64) + b0[:, 0].astype(np.uint64)) & _M return np.stack([cr, ci], axis=1).astype(np.uint32)
loop_110
simd-loop
loop_110
Compute complex dot product of two arrays of uint32 complex numbers
true
simd-loop
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"size": {"type": "var", "description": "axis size"}, "size2": {"type": "var", "description": "axis size2"}, "cdim": {"type": "const", "value": 2, "description": "const cdim"}}
{"a0": {"shape": ["size2", "cdim"], "dtype": "int8"}, "b0": {"shape": ["size2", "cdim"], "dtype": "int8"}}
{"c0": {"shape": ["size", "cdim"], "dtype": "int32", "description": "Output array"}}
[]
import numpy as np def run(a0, b0): a = a0.astype(np.int64); b = b0.astype(np.int64) ae, ao = a[0::2], a[1::2]; be, bo = b[0::2], b[1::2] cr = (ae[:, 0]*be[:, 0] - ae[:, 1]*be[:, 1]) + (ao[:, 0]*bo[:, 0] - ao[:, 1]*bo[:, 1]) ci = (ae[:, 1]*be[:, 0] + ae[:, 0]*be[:, 1]) + (ao[:, 1]*bo[:, 0] + ao[:, 0]*b...
loop_112
simd-loop
loop_112
Complex multiply-accumulate over arrays of uint32 complex numbers
true
simd-loop
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"size": {"type": "var", "description": "axis size"}, "cdim": {"type": "const", "value": 2, "description": "const cdim"}}
{"a0": {"shape": ["size", "cdim"], "dtype": "uint32"}, "b0": {"shape": ["size", "cdim"], "dtype": "uint32"}}
{"c0": {"shape": ["size", "cdim"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np _M = np.uint64(0xffffffff) def run(a0, b0): ar = a0[:, 0].astype(np.uint64); ai = a0[:, 1].astype(np.uint64) br = b0[:, 0].astype(np.uint64); bi = b0[:, 1].astype(np.uint64) cr = (ar * br - ai * bi) & _M ci = (ar * bi + ai * br) & _M return np.stack([cr, ci], axis=1).astype(np.u...
loop_113
simd-loop
loop_113
Sum adjacent uint32 pairs across an array (horizontal pairwise add)
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"}}
{"a0": {"shape": ["N"], "dtype": "int32"}, "b0": {"shape": ["N"], "dtype": "int32"}}
{"c0": {"shape": ["N"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(a0, b0): n = len(a0) ap = np.concatenate([a0.astype(np.int32), np.zeros(2, np.int32)]) bp = np.concatenate([b0.astype(np.int32), np.zeros(2, np.int32)]) n_pairs = (n + 1) // 2 even = np.arange(n_pairs) * 2 c = np.zeros(n, dtype=np.int32) # c[2k] = a[2k]+a[2k+1] ...
loop_114
simd-loop
loop_114
Compute auto-correlation of an integer array with widening accumulation
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": "axis n"}, "lags": {"type": "var", "description": "axis lags"}, "scale": {"type": "const", "value": 4, "description": "const scale"}}
{"data": {"shape": ["n"], "dtype": "int16"}}
{"res": {"shape": ["lags"], "dtype": "int16", "description": "Output array"}}
[]
import numpy as np def run(data): n = int(data.shape[0]) scale = 4 d = data.astype(np.int64) res = np.zeros(n, dtype=np.int16) for lag in range(n): # Same arithmetic as the scalar C reference: a wrapping int32 # accumulator, arithmetic shift, then a wrapping int16 store. acc...
loop_120
simd-loop
loop_120
Sort a small integer array using insertion sort
false
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"data": {"shape": ["N"], "dtype": "int32"}}
{"sorted_data": {"shape": ["N"], "dtype": "int32", "description": "Sorted array (in-place)"}}
[]
import numpy as np def run(data): return np.sort(data)
loop_121
simd-loop
loop_121
Partition an integer array around a pivot (one pass of quicksort)
false
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"data": {"shape": ["N"], "dtype": "int32"}}
{"sorted_data": {"shape": ["N"], "dtype": "int32", "description": "Sorted array (in-place)"}}
[]
import numpy as np def run(data): return np.sort(data)
loop_122
simd-loop
loop_122
Sort element pairs using odd-even transposition compare-and-swap
false
false
false
10
[ "baseline-simd-loop-sve" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"data": {"shape": ["N"], "dtype": "int32"}}
{"sorted_data": {"shape": ["N"], "dtype": "int32", "description": "Sorted array (in-place)"}}
[]
import numpy as np def run(data): return np.sort(data)
loop_123
simd-loop
loop_123
Merge two sorted halves using a bitonic compare-and-swap network
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"data": {"shape": ["N"], "dtype": "int32"}}
{"sorted_data": {"shape": ["N"], "dtype": "int32", "description": "Sorted array (in-place)"}}
[]
import numpy as np def run(data): return np.sort(data)
loop_124
simd-loop
loop_124
Sort integers by digit using a single radix counting pass
false
false
false
10
[ "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"N": {"type": "var", "description": "Array length"}}
{"data": {"shape": ["N"], "dtype": "int32"}}
{"sorted_data": {"shape": ["N"], "dtype": "int32", "description": "Sorted array (in-place)"}}
[]
import numpy as np def run(data): return np.sort(data)
loop_126
simd-loop
loop_126
Conditionally update array elements where a per-element predicate holds
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): res = np.uint32(0) for i in range(len(a)): res = np.uint32((int(res) + int(a[i]) * int(b[i])) & 0xFFFFFFFF) if res % 2: res = np.uint32((int(res) + 1) & 0xFFFFFFFF) return res
loop_127
simd-loop
loop_127
Search an array for the first element satisfying a condition, exit immediately on match
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): # early exit on a[i]==512 never fires with generated inputs (values 1-100) res = np.uint32(0) for i in range(len(a)): res = np.uint32((int(res) + int(a[i]) * int(b[i])) & 0xFFFFFFFF) if a[i] == 512: break return res
loop_128
simd-loop
loop_128
Shift array elements in place where source and destination ranges may overlap
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:streaming-sve" ]
{"N": {"type": "var", "description": "Array length"}}
{"a": {"shape": ["N"], "dtype": "int32"}, "b": {"shape": ["N"], "dtype": "int32"}}
{"c": {"shape": ["N"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return a + b
loop_130
simd-loop
loop_130
Multiply two FP32 matrices using tiled register accumulation
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}, "k": {"type": "var", "description": "axis k"}}
{"a": {"shape": ["m", "k"], "dtype": "float32"}, "b": {"shape": ["k", "n"], "dtype": "float32"}}
{"c": {"shape": ["m", "n"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return (a.astype(np.float64) @ b.astype(np.float64)).astype(np.float32)
loop_135
simd-loop
loop_135
Multiply INT8 matrices accumulating into INT32 using tiled 4-element dot products
false
false
false
10
[ "baseline-simd-loop-sve2" ]
[ "simd-loop" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}, "k": {"type": "var", "description": "axis k"}}
{"a": {"shape": ["m", "k"], "dtype": "int8"}, "b": {"shape": ["k", "n"], "dtype": "int8"}}
{"c": {"shape": ["m", "n"], "dtype": "int32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return (a.astype(np.int64) @ b.astype(np.int64)).astype(np.int32)
loop_216
simd-loop
loop_216
Multiply an FP32 matrix by an FP32 vector (column-major GEMV)
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["n", "m"], "dtype": "float32"}, "x": {"shape": ["n"], "dtype": "float32"}}
{"b": {"shape": ["m"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(a, x): return (a.astype(np.float64).T @ x.astype(np.float64)).astype(np.float32)
loop_217
simd-loop
loop_217
Multiply an INT8 matrix by an INT8 vector accumulating into INT32 (row-major GEMV)
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["m", "n"], "dtype": "uint8"}, "b": {"shape": ["n"], "dtype": "uint8"}}
{"c": {"shape": ["m"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return (a.astype(np.uint64) @ b.astype(np.uint64)).astype(np.uint32)
loop_218
simd-loop
loop_218
Multiply an FP64 matrix by an FP64 vector (column-major GEMV)
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["n", "m"], "dtype": "float64"}, "x": {"shape": ["n"], "dtype": "float64"}}
{"b": {"shape": ["m"], "dtype": "float64", "description": "Output array"}}
[]
import numpy as np def run(a, x): return a.astype(np.float64).T @ x.astype(np.float64)
loop_219
simd-loop
loop_219
Multiply an INT8 matrix by an INT8 vector accumulating into INT32 (column-major GEMV)
true
simd-loop
false
false
10
[ "baseline-simd-loop-sme2", "baseline-simd-loop-sve", "baseline-simd-loop-sve2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["n", "m"], "dtype": "uint8"}, "b": {"shape": ["n"], "dtype": "uint8"}}
{"c": {"shape": ["m"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(a, b): return (a.astype(np.uint64).T @ b.astype(np.uint64)).astype(np.uint32)
loop_220
simd-loop
loop_220
Multiply an FP32 matrix by an FP32 vector (row-major GEMV)
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["m", "n"], "dtype": "float32"}, "x": {"shape": ["n"], "dtype": "float32"}}
{"b": {"shape": ["m"], "dtype": "float32", "description": "Output array"}}
[]
import numpy as np def run(a, x): return (a.astype(np.float64) @ x.astype(np.float64)).astype(np.float32)
loop_221
simd-loop
loop_221
Multiply an FP64 matrix by an FP64 vector (row-major GEMV)
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["m", "n"], "dtype": "float64"}, "x": {"shape": ["n"], "dtype": "float64"}}
{"b": {"shape": ["m"], "dtype": "float64", "description": "Output array"}}
[]
import numpy as np def run(a, x): return a.astype(np.float64) @ x.astype(np.float64)
loop_223
simd-loop
loop_223
Transpose a matrix in-place using interleaved load and store
false
false
false
10
[ "baseline-simd-loop-sme2" ]
[ "simd-loop", "sme2-kernel:za" ]
{"m": {"type": "var", "description": "axis m"}, "n": {"type": "var", "description": "axis n"}}
{"a": {"shape": ["m", "n"], "dtype": "uint32"}}
{"at": {"shape": ["n", "m"], "dtype": "uint32", "description": "Output array"}}
[]
import numpy as np def run(a): return np.ascontiguousarray(a.T)
softmax_fp32
kleidiai
softmax
1-D softmax, float32 in and out: y = exp(x - max(x)) / sum(exp(x - max(x))) over a vector of length N (e.g. one attention row or one vocabulary of logits). N varies per workload. Judged by SQNR against the baseline: outputs are about 1/N, below the default absolute tolerance. Baseline: KleidiAI kai_softmax_f32_f32_1d_s...
false
false
false
13
[ "baseline-kleidiai" ]
[ "status:active", "baseline-solution:kleidiai", "correctness:sqnr" ]
{"N": {"type": "var"}}
{"x": {"shape": ["N"], "dtype": "float32"}}
{"y": {"shape": ["N"], "dtype": "float32"}}
[]
import numpy as np def run(x): x = x.astype(np.float64) e = np.exp(x - x.max()) return (e / e.sum()).astype(np.float32)