Verba/Rapida

Esperimenti #138

No commit of an empty command buffer: `gpu::finalize` skips a buffer with no work and no events, MLX's...

done

Il testo degli esperimenti resta in inglese, come l'ha scritto il laboratorio.

Cosa è stato provato

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

Modello e configurazione

the best

Guadagno atteso

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

Da dove viene l'idea

none

Esito

done 2026-11-11: , -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 , so they cost nothing on a real step (`2026-11-11-mac-empty-commits/README.md`)

Lezione

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.

Adottato

no (no gain; lossless and live, but not , since it adds code for no measured effect)

Vuoi vedere cosa hanno prodotto questi esperimenti? Lesto, il motore di inferenza per Gemma 4 sui Mac con Apple silicon, è su lestoengine.com

Creato da Federico Andrioli, @fedeandri su X Le misure di un laboratorio di ricerca, ricavate direttamente dai suoi file. Dati aggiornati al