---
id: pr-flash-attention-2402
repo: Dao-AILab/flash-attention
pr: 2402
title: 'feat(cute): implement softcap backward pass, correct math formula, and resolve JIT cache bug'
author: CaesarG
date: '2026-04-11'
url: https://github.com/Dao-AILab/flash-attention/pull/2402
source_category: upstream-code
architectures:
- sm90
tags:
- hopper
- sm80
- sm90
techniques:
- cache-policy
hardware_features:
- hopper
kernel_types:
- attention
languages:
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: 14f3627d44687513adff00819ec894e54bf92cd7
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_sm100.py
- flash_attn/cute/flash_bwd_sm90.py
- flash_attn/cute/flash_fwd.py
- flash_attn/cute/interface.py
- flash_attn/cute/utils.py
- tests/cute/test_flash_attn.py
- tests/cute/test_flash_attn_race_condition.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-2402
head_ref_oid: b94e8ec35b6b741ec9099d45559ada36ea9354c8
---
# feat(cute): implement softcap backward pass, correct math formula, and resolve JIT cache bug

- Repository: `Dao-AILab/flash-attention`
- PR: [2402](https://github.com/Dao-AILab/flash-attention/pull/2402)
- 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_sm100.py`
- `flash_attn/cute/flash_bwd_sm90.py`
- `flash_attn/cute/flash_fwd.py`
- `flash_attn/cute/interface.py`
- `flash_attn/cute/utils.py`
- `tests/cute/test_flash_attn.py`
- `tests/cute/test_flash_attn_race_condition.py`

## Evidence Bundle

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