In this article
The 1.32 CPU MoE alias repair preserves tokens before clearing reused output; graph-level allocation conditions belong in the regression.
ONNX Runtime 1.32.0 includes CPU MoE input preservation when output storage aliases token input storage. The linked PR explains how clearing the output destroyed tokens before expert computation consumed them. A direct operator test with independent input and output buffers can therefore pass while an optimized graph using in-place reuse produces wrong results.
An in-place contract is an implementation obligation
Allowing output to reuse input storage can save memory, but the kernel must preserve input values until their last read. The PR fixes that obligation for CPU MoE. A zeroing step that is safe for a separate output becomes destructive when the two addresses coincide. This is an ownership-and-ordering issue, not a change to expert weights or the model’s routing distribution.
Graph context decides whether aliasing occurs
Upstream includes computed token inputs and downstream consumers in its reproduction. A graph input may receive different allocation treatment from an intermediate produced by Add or viewed through Reshape. A proposed suite should retain these graph contexts rather than only invoking MoE in isolation. Verify the actual alias condition with instrumentation where available, so a passing test does not merely reflect an allocator choosing separate storage.
Normalization mode must not control preservation
The PR makes token preservation independent of routing-weight normalization. Those are different semantic concerns: one controls how routing contributions combine, while the other protects unread memory. Test both normalization settings with aliased and independent buffers. Otherwise a mode that happened to copy tokens for another reason can hide the missing preservation path. Distinct input values make premature clearing visible before later activations obscure the original corruption.
Memory reuse needs numerical coverage
A smaller memory footprint is not a valid optimization if it changes the result through destroyed inputs. Compare complete graph outputs with a no-reuse reference before discussing savings. This article reports the release fix and regression conditions, without claiming a new MoE benchmark or assuming every CPU MoE error has this cause. The relevant evidence links actual aliasing to correct token preservation in the installed build.
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.