In this article
Persistent MatMulNBits tactics in v0.4.0 are environment-keyed; validate cache rejection and warmup coverage before CUDA Graph capture.
CUDA Plugin EP v0.4.0 adds an opt-in persistent tactic cache for the fpA_intB MatMulNBits path. The linked PR keys reuse by hardware and quantization details and rejects incompatible cached tactics. A saved timing choice is therefore an environment-dependent execution artifact, not a universally portable optimization attached only to the model’s matrix dimensions.
Shape is necessary but insufficient for a key
Two operations with equal N and K can differ in activation type, bit width, block size, zero points or packing target. Reusing a tactic across those differences can violate assumptions. A proposed test keeps dimensions fixed while varying each semantic field and confirms separation. Hardware and runtime identity need their own controls. A cache hit should mean a compatible problem was previously tuned, not merely that two matrices looked similar in a log.
A stale tactic can be rejected without failing the model
The PR validates loaded choices against available configurations and selection-policy version. A miss or rejection can trigger profiling again. Test malformed or incompatible cache entries and verify safe recovery rather than requiring every old entry to remain reusable forever. A cache is an optimization layer, not the sole source of the operation’s correctness. Preserve diagnostics so repeated retuning after an upgrade is explainable instead of silently attributed to general startup instability.
Warmup must cover work needed during capture
The linked implementation skips lazy profiling while a CUDA stream is capturing. A proposed lifecycle test warms the relevant shape buckets before capture, then verifies replay without unexpected profiling work. A single convenient warmup shape cannot promise every later shape is tuned. Keep the allowed shape set explicit and distinguish cache loading, first-use tuning and steady inference time when presenting startup benefits.
Persistence needs correct flush and concurrency
The PR batches writes outside the inference path and coordinates concurrent updates. A local test should release sessions cleanly, reopen the cache in a fresh process and verify retained choices from multiple writers where supported. This article reports the cache-identity and lifecycle contract without new benchmark numbers. A useful result demonstrates compatible reuse and safe retuning, rather than assuming a nonempty cache file proves the intended optimization ran.
Sources
Related reading
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.