---
id: pr-flash-attention-2313
repo: Dao-AILab/flash-attention
pr: 2313
title: '[Cute,Sm100] Introduce a flexible lambda-based R2P masking'
author: Alkaid-Benetnash
date: '2026-03-12'
url: https://github.com/Dao-AILab/flash-attention/pull/2313
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark kernel
- cuda kernel
- triton kernel
techniques: []
hardware_features:
- blackwell
kernel_types:
- attention
languages:
- cuda-cpp
- cute-dsl
- triton
captured_at: '2026-05-16'
status: merged
merge_sha: 5dcdfcc65d0b57c6ea552e0f2d213761212e9184
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- flash_attn/cute/mask.py
- flash_attn/cute/utils.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-2313
head_ref_oid: 36a475d2116eff48d2f5b41836fb5bbfea1baf95
---
# [Cute,Sm100] Introduce a flexible lambda-based R2P masking

- Repository: `Dao-AILab/flash-attention`
- PR: [2313](https://github.com/Dao-AILab/flash-attention/pull/2313)
- 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/mask.py`
- `flash_attn/cute/utils.py`

## Evidence Bundle

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