Skip to content

cuda : the gate product and the quantize step behind ssm_conv are their own launches #114

Closed

Description

@rafasmour

The short conv block of LFM2 / LFM3 ends with out_proj(c * ssm_conv(bx)). On ROCm that is four launches per conv layer for one token: ssm_conv_f32, k_bin_bcast for the product with the gate c, quantize_q8_1 for the input of the output projection, and the mat-vec.

LFM3 1.7B Q8_0 has 13 conv layers: 26 of its 421 launches per token (rocprofv3 kernel trace on an RX 7900 XT) are that product and that quantize step.

The conv kernel can do both: one thread holds one channel, so it can multiply by the gate value, and a warp holds the 32 values of one q8_1 block.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions