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 output scale of a layer is its own launch #112
Each Gemma 4 layer ends with (rms_norm(x) * w + residual) * layer_output_scale. The norm, the weight and the residual add run in one kernel already; the product with the single scale value is a separate k_bin_bcast launch: 60 launches per token on Gemma 4 31B (rocprofv3 kernel trace on an RX 7900 XT), about 2.4 us of kernel time each plus the launch.
The rms_norm kernel can apply the scale after the add.
Activity