---
id: pr-flash-attention-2043
repo: Dao-AILab/flash-attention
pr: 2043
title: '[Cute,Fwd] Extend score_mod to variable sequence length'
author: reubenconducts
date: '2025-12-15'
url: https://github.com/Dao-AILab/flash-attention/pull/2043
source_category: upstream-code
architectures:
- sm100
- sm90
tags:
- arch_pipeline
- attention_kv
- benchmark_test
- compiler_runtime
- scheduler_autotune
- sm90
- varlen
techniques:
- async-copy
- autotuning
- pipeline-stages
- tile-scheduling
hardware_features:
- blackwell
- hopper
- tma
kernel_types:
- attention
- compiler
- runtime
- scheduler
- softmax
languages:
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: fd8d5eb3631f95fbbb4544cefae70954f87f7f16
inclusion_reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.
changed_paths:
- flash_attn/cute/flash_fwd.py
- flash_attn/cute/flash_fwd_sm100.py
- flash_attn/cute/interface.py
- flash_attn/cute/seqlen_info.py
- flash_attn/cute/softmax.py
- tests/cute/score_mod_definitions.py
- tests/cute/test_flash_attn.py
- tests/cute/test_score_mod.py
- tests/cute/test_score_mod_varlen.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-2043
head_ref_oid: ef4eb9557e58132ee22b190f5f399099a04d52fa
---
# [Cute,Fwd] Extend score_mod to variable sequence length

- Repository: `Dao-AILab/flash-attention`
- PR: [2043](https://github.com/Dao-AILab/flash-attention/pull/2043)
- Decision: `Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.`
- Reason: Preserve page/KV/layout and plan-run contracts; profile memory traffic separately from math utilization.

## Changed Paths

- `flash_attn/cute/flash_fwd.py`
- `flash_attn/cute/flash_fwd_sm100.py`
- `flash_attn/cute/interface.py`
- `flash_attn/cute/seqlen_info.py`
- `flash_attn/cute/softmax.py`
- `tests/cute/score_mod_definitions.py`
- `tests/cute/test_flash_attn.py`
- `tests/cute/test_score_mod.py`
- `tests/cute/test_score_mod_varlen.py`

## Evidence Bundle

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