Skip to content

how to deal with shapes like 7, 9 ? and how to deal with linears with bias ? #23

Closed

Description

@artetaout

when input_len is 7, how to do ?
when forward a linear with bias, how to deal with it ?

Activity

  1. LyricZhao commented on Feb 28, 2025

    @LyricZhao
    Collaborator

    when input_len is 7, how to do ?

    The normal GEMM natively supports M == 7, there is an issue in the test and now has been fixed in b69f630.

    For grouped GEMM kernels, only masked layout supports such shapes.

    when forward a linear with bias, how to deal with it ?

    No bias support currently.

  2. Li-dongyang commented on Feb 28, 2025

    @Li-dongyang

    Could you explain the rationale behind the bug fix @LyricZhao ? Is this related to the copy operations in the code? Thanks!

  3. LyricZhao commented on Feb 28, 2025

    @LyricZhao
    Collaborator

    Could you explain the rationale behind the bug fix @LyricZhao ? Is this related to the copy operations in the code? Thanks!

    This is just related to an assertion assert lhs_scales.shape == (m, (k + 127) // 128). The previous utillity PyTorch function get_col_major_tma_aligned_tensor failed to make a proper shape after transposing for TMA alignment.

    You can run the test using the commit before/after for comparison.

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