---
id: pr-flash-attention-1840
repo: Dao-AILab/flash-attention
pr: 1840
title: Refactors to enable FlexAttention
author: drisspg
date: '2025-10-08'
url: https://github.com/Dao-AILab/flash-attention/pull/1840
source_category: upstream-code
architectures:
- sm100
tags:
- blackwell
- sm80
techniques: []
hardware_features:
- blackwell
kernel_types:
- attention
languages: []
captured_at: '2026-05-16'
status: merged
merge_sha: 5183de433587a8aedd2450e9f18166c24521af29
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- .gitignore
- flash_attn/cute/flash_fwd.py
- flash_attn/cute/flash_fwd_sm100.py
- flash_attn/cute/interface.py
- flash_attn/cute/softmax.py
- flash_attn/cute/utils.py
- tests/cute/test_score_mod.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-1840
head_ref_oid: 714cf3a35f2b057edc1402ca4a7b6aec406997ee
---
# Refactors to enable FlexAttention

- Repository: `Dao-AILab/flash-attention`
- PR: [1840](https://github.com/Dao-AILab/flash-attention/pull/1840)
- Decision: `Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.`
- Reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.

## Changed Paths

- `.gitignore`
- `flash_attn/cute/flash_fwd.py`
- `flash_attn/cute/flash_fwd_sm100.py`
- `flash_attn/cute/interface.py`
- `flash_attn/cute/softmax.py`
- `flash_attn/cute/utils.py`
- `tests/cute/test_score_mod.py`

## Evidence Bundle

`evidence/pull-bundles/flash-attention/gh-1840`
