---
id: pr-flash-attention-1769
repo: Dao-AILab/flash-attention
pr: 1769
title: Add torch.compile support to flash attention 3
author: guilhermeleobas
date: '2025-12-04'
url: https://github.com/Dao-AILab/flash-attention/pull/1769
source_category: upstream-code
architectures:
- sm90
tags:
- cuda kernel
- hopper
- sm80
- triton kernel
techniques: []
hardware_features:
- hopper
kernel_types:
- attention
languages:
- cuda-cpp
- triton
captured_at: '2026-05-16'
status: merged
merge_sha: 59df2f9bdf029f8e837ca79e1c0fe8c5d32dea25
inclusion_reason: Search-matched CUDA kernel optimization PR; materialize diff/source before synthesis.
changed_paths:
- .gitignore
- hopper/flash_api.cpp
- hopper/flash_api_stable.cpp
- hopper/flash_attn_interface.py
- hopper/setup.py
- hopper/test_flash_attn.py
- hopper/test_torch_compile_and_export.py
artifact_dir: evidence/pull-bundles/flash-attention/gh-1769
head_ref_oid: 3fcde4b345e37295c7a76a8d1e3dcb334cdff8c5
---
# Add torch.compile support to flash attention 3

- Repository: `Dao-AILab/flash-attention`
- PR: [1769](https://github.com/Dao-AILab/flash-attention/pull/1769)
- 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`
- `hopper/flash_api.cpp`
- `hopper/flash_api_stable.cpp`
- `hopper/flash_attn_interface.py`
- `hopper/setup.py`
- `hopper/test_flash_attn.py`
- `hopper/test_torch_compile_and_export.py`

## Evidence Bundle

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