Skip to content

interweave: unified GPU matmul offload server (replaces ~20 prototypes)#30

Merged
Scottcjn merged 1 commit into
mainfrom
feat/unified-matmul-server
Jul 2, 2026
Merged

interweave: unified GPU matmul offload server (replaces ~20 prototypes)#30
Scottcjn merged 1 commit into
mainfrom
feat/unified-matmul-server

Conversation

@Scottcjn

@Scottcjn Scottcjn commented Jul 2, 2026

Copy link
Copy Markdown
Owner

One canonical matmul offload server for the Interweave path. This is the code that has been running the POWER8 to C4130 offload, cleaned up into a single file with a real test suite instead of the ~20 matmul_*.py prototypes that grew on the deployment box.

What it does:

  • Dtype dispatch registry for F32, F16, Q8_0, Q4_K, MXFP4 with correct ggml block sizes (fixes the 148-byte Q4_K drift)
  • Wire contract pinned to the actual POWER8 client header (row-major, F32 default, magic-discriminated single and batch requests)
  • Input validation: row-width block alignment, F32 working-set caps
  • Per-recv socket timeout, GPU serialization lock, little-endian guard
  • Localhost-bound health and metrics HTTP sidecar
  • Graceful CPU/NumPy fallback when no GPU is present

Testing: 14 tests, CPU-runnable (golden dequant oracles, all 5 dtypes end to end, persistent multi-op, DoS rejection, health endpoint) plus a GPU/CPU parity test. All pass on the C4130 (V100 + M40) as of today.

One canonical server for the Interweave heterogeneous-offload path, replacing
the ~20 matmul_*.py prototypes. Dtype dispatch registry (F32/F16/Q8_0/Q4_K/
MXFP4) with correct ggml block sizes (144/34/17, fixes the 148-byte Q4_K
drift), wire contract pinned to the real POWER8 client (row-major, F32
default, magic-discriminated single and batch), input validation with
row-width block alignment and F32 working-set caps, per-recv socket timeout,
GPU serialization lock, little-endian guard, localhost-bound health and
metrics sidecar, and graceful CPU/NumPy fallback.

Ships a CPU-runnable pytest suite (golden dequant oracles, all 5 dtypes
end to end, persistent multi-op, DoS rejection, health HTTP) plus a GPU/CPU
parity test. All 14 tests pass on the C4130 deployment box. Old prototype
files on the deployment box stay in place until a client-confirmed cutover.

Signed-off-by: Scott <scottbphone12@gmail.com>
@Scottcjn Scottcjn merged commit df9414e into main Jul 2, 2026
1 check passed
@Scottcjn Scottcjn deleted the feat/unified-matmul-server branch July 2, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants