eb2397ccf5
Extracts the verified 2D-tiling matmul into a clean library function: rkt_npu_matmul(fd, X, Wc, bias, M,N,K, zero-points, scales, tile_m,tile_n, Y) -> tiles via rkt_gemm_plan, runs each single-op tile (scaled builder + bias BO + INT64_MAX prep_bo), assembles Y. This is the function a ggml MUL_MAT backend calls. gemmtest.c is now a test driver: small / large-M(4096) / 2D-tiled(2048x256) / gemma-scale(K=2048) all PASS on the NPU. Next (U6): fork rk-llama.cpp ggml-rknpu2.cpp, replace rknn_matmul_run (line 777) with rkt_npu_matmul, map ggml Q8_0 tensors -> our int8 X/Wc + per-tensor scales, wire buffer-type + supports_op(MUL_MAT). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>