Experiments #138
No commit of an empty command buffer: `gpu::finalize` skips a buffer with no work and no events, MLX's...
done
What was tested
No commit of an empty command buffer: `gpu::finalize` skips a buffer with no work and no events, MLX's throttle otherwise submits 21 and 52 empty ones per step (`transforms.cpp:279-288`), lossless
Model and setup
the best
Expected gain
at most +0.08 ms at 1k and +0.22 ms at 8k (kb118's hollow stream, 1.9% of the 8k step); less on a real step, and row 130 removes commits too
Where the idea came from
none
Outcome
done 2026-11-11: A valid experiment that did not beat the best score by more than the noise., The writing phase: the model produces the reply one token at a time. Read more -0.01% [-0.08, +0.02] against a 0.03% floor, 150 of 150 replies identical, 6.4 empty buffers a step skipped; the empties sit right before the throttle's wait on the A graphics card, used here as the chip that does the heavy arithmetic for a model., so they cost nothing on a real step (`2026-11-11-mac-empty-commits/README.md`)
Lesson
removing host work that sits right before a blocking wait on a backlogged GPU gains nothing, even when it fires 6 to 9 times a step: a hollow-stream price measures the work on the critical path only when the GPU has nothing queued, so read what the CPU does next before pricing a host saving from a microbenchmark.
Adopted
no (no gain; lossless and live, but not Folding the adapter's changes into the base weights to get one ordinary model., since it adds code for no measured effect)