You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cuda : the activation scale of the MoE down projection takes ten launches and a single-thread maximum #128
For Mellum, Mistral4, Flint and Laguna the graph scales the input of the MoE down projection by a power of two per row (llm_graph_context::build_amax_src1_f16): abs, max pool over the row, scale, log, scale, ceil, clamp, scale, exp, then a div; the scale is multiplied back behind the mat-mul.
On ROCm that is ten launches per MoE layer for one token, and the pool kernel (pool1d_nchw_kernel) computes each row maximum with a single thread.
Kernel trace of Mellum 2.1 12B-A2.5B Q5_K_M, one token, on an RX 7900 XT (rocprofv3): 813 launches per token, of which 280 belong to this chain. pool1d_nchw_kernel 28 launches of 43.8 us = 1.23 ms of 6.07 ms kernel time; the eight small kernels around it another 0.4 ms.
Activity