← Hackathons

BF16MatMul

BF16 matrix multiplication with FP32 accumulation and a final BF16 output

Operator definition

c = a @ b

Interface

bf16_matmul(Tensor a, Tensor b) -> Tensor c

Data ranges

a:[M,K],b:[K,N],c:[M,N]; M=32..65536,N,K=64..65536

Single-die stress scale

One physical die only (nominal 64 GiB HBM). Functional cases remain small and exhaustive; the independent three-tier stress suite exercises large bandwidth, compute and random-access workloads. Input + output tensors must total <=48 GiB, candidate workspace <=8 GiB; reserve >=8 GiB for runtime. Shape bounds are not a Cartesian guarantee: combinations exceeding the byte budget are invalid. Pressure correctness compares complete offline binary standards outside timing. Public stress runs are debugging only; formal pressure scoring starts only after all functional checks pass. Host wall time includes CPU work, dispatch and device synchronization, not only kernel time. No other die or CPU computation fallback.

Value ranges and coverage

a, b: [-256, 256]. Finite inputs only. Coverage includes zero, small magnitudes down to 2^-12, large magnitudes, positive/negative-only data, mixed scales, sparse data and representable boundaries. Task-specific tests also cover cancellation, BF16 ties and saturated softmax. NaN/Inf are excluded; subnormal preservation is not required. Not every tensor must span the entire range.

Parameters

Inputs

Outputs

Attrs

Numerical and implementation requirements

Inputs are contiguous and on the same card; a and b have finite values in [-256, 256]. Accumulate in FP32 and cast only the final result to BF16. Handle boundary tiles for every valid M/N/K. Transpose, bias, broadcasting and quantization are not supported.

Outputs must remain on the input device, be contiguous, leave all inputs unchanged, and not alias any input. One physical die only; using the sibling die or multi-card communication is prohibited. Core computation, data movement and conversions must use custom NPU kernels. Built-in ACLNN operators, torch delegation, CPU fallback and cached answers are prohibited.

a, b: [-256, 256]. Finite inputs only. Coverage includes zero, small magnitudes down to 2^-12, large magnitudes, positive/negative-only data, mixed scales, sparse data and representable boundaries. Task-specific tests also cover cancellation, BF16 ties and saturated softmax. NaN/Inf are excluded; subnormal preservation is not required. Not every tensor must span the entire range.

One physical die only (nominal 64 GiB HBM). Functional cases remain small and exhaustive; the independent three-tier stress suite exercises large bandwidth, compute and random-access workloads. Input + output tensors must total <=48 GiB, candidate workspace <=8 GiB; reserve >=8 GiB for runtime. Shape bounds are not a Cartesian guarantee: combinations exceeding the byte budget are invalid. Pressure correctness compares complete offline binary standards outside timing. Public stress runs are debugging only; formal pressure scoring starts only after all functional checks pass. Host wall time includes CPU work, dispatch and device synchronization, not only kernel time. No other die or CPU computation fallback.

Scoring: accuracy 20%, performance 80%; compilation has no bonus. All accuracy checks must pass before pressure evaluation.