Skip to content

[RFC] Fuse L2 norm into short conv? #657

Description

@sustcsonglin

Proposal

L2 norm on QK has been used in DeltaNet, Gated DeltaNet, KDA, and related models. However, this computation takes a non-negligible portion of the total running time, especially in backward where it recomputes the L2 norm to save activations. Since QK are often outputs of a short convolution, it would be interesting to fuse the L2 norm into the short convolution so that we avoid an additional kernel launch and activation recomputation or storage.

Rationale

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions