Skip to content

cuda : few-row MMQ starts too late for Q8_0 on RDNA3.0 #105

Closed

Description

@rafasmour

On RDNA3.0 the few-row MMQ kernel (WMMA) starts at 17 columns for Q8_0, the value its author tuned on gfx1151. Batches of 9 to 16 tokens of a Q8_0 matrix go to the regular MMQ kernel.

On an RX 7900 XT the few-row kernel is faster from 9 columns. Up to 8 columns the mat-vec kernel stays the faster one (LFM3 1.7B Q8_0: 5.44 ms at 8 tokens with the mat-vec kernel, 6.46 ms at 9 tokens with the few-row kernel).

llama-bench -p 480 -n 0 -b N -ub N, LFM3 1.7B Q8_0, time per batch: 9 tokens 6.97 -> 6.46 ms, 12 tokens 7.07 -> 6.53 ms, 16 tokens 7.29 -> 6.68 ms.

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