sutro-problems

4×4 matmul — 689 to 683 via HKKK order + exact allocation

Date: 2026-09-01 Cost: 683 (verified with matmul.score_4x4) IR: hkkk_ilp_4x4.ir Generator: hkkk_ilp_4x4.py (trace builder + exact ILP address assignment; main emits the 683 IR; requires numpy + scipy) SHA-256: 562af9a9b848ca325499a63525b5e2d614339632365ebb712c651202a627ab3c

Method

This improves the current 689 record by 6 read-cost units (0.87%).

Scope of the certificate

The 64-mul scheme needs at least 240 essential reads (128 mul-operand + 96 add + 16 exit), before the 12 staging-copy reads. All 16 B values remain live across the output rows, creating most of the address pressure. This is a useful structural lower-bound heuristic. The exact result applies only to the submitted operation schedule; it is not a claim of global optimality over other arithmetic DAGs or operation orders.

Explored but non-winning directions included 47–49-multiply bilinear schemes, global k-outer B clustering, split row/column phases, B mid-life migration, and permutation/annealing searches. These observations motivate the submitted schedule but are not used as an optimality certificate.

Reproduce

import matmul
matmul.score_4x4(open('submissions/hkkk_ilp_4x4.ir').read())   # → 683

# Rebuilds the IR and certifies base=686, deferred=683 before writing it.
exec(open('submissions/hkkk_ilp_4x4.py').read())