Skip to content

[RFC]: Deprecate the FlexAttention backend #50324

Description

@yewentao256

Motivation.

FlexAttention is no longer selected by default on ROCm and ranks behind TritonAttention on CUDA.

It has a lot of test coverage and is not used in practice, and sometimes breaks CI like #46531

TritonAttention now covers the standard FlexAttention use cases, including FP32, encoder-only, non-causal, sliding window, multimodal prefix, batch invariance, and Unlimited-OCR R-SWA.

Removing FlexAttention would eliminate roughly 1,900 lines of backend-specific implementation and tests, while reducing reliance on private PyTorch FlexAttention APIs.

Proposed Change.

  • Now: Mark FLEX_ATTENTION as deprecated.
  • v0.29.0/v0.30.0: Remove the backend implementation, enum entry, Flex-specific configuration fields, and tests.

Feedback Period.

No response

CC List.

@liangel-02 @Isotr0py @MatthewBonanni @mgoin @LucasWilkinson @andakai

Any Other Things.

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions