---
id: pr-flash-attention-2189
repo: Dao-AILab/flash-attention
pr: 2189
title: '[Cute][Flex] Fix expanded tensor bug'
author: drisspg
date: '2026-01-17'
url: https://github.com/Dao-AILab/flash-attention/pull/2189
source_category: upstream-code
architectures:
- sm90
tags:
- hopper
techniques: []
hardware_features:
- hopper
kernel_types:
- attention
languages:
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: a0f9f418fd15df20d9418daca715ede24387c412
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- flash_attn/cute/flash_bwd.py
- flash_attn/cute/flash_bwd_sm90.py
- flash_attn/cute/flash_fwd.py
- tests/cute/test_mask_mod.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-2189
head_ref_oid: 133360b454f702f61f7eef9e509f1742cd166290
---
# [Cute][Flex] Fix expanded tensor bug

- Repository: `Dao-AILab/flash-attention`
- PR: [2189](https://github.com/Dao-AILab/flash-attention/pull/2189)
- 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

- `flash_attn/cute/flash_bwd.py`
- `flash_attn/cute/flash_bwd_sm90.py`
- `flash_attn/cute/flash_fwd.py`
- `tests/cute/test_mask_mod.py`

## Evidence Bundle

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