---
id: pr-pytorch-153641
repo: pytorch/pytorch
pr: 153641
title: '[FlexAttention] explicilty create grad_q w/ strides'
author: pytorchbot
date: '2025-05-21'
url: https://github.com/pytorch/pytorch/pull/153641
source_category: upstream-code
architectures:
- sm100
tags:
- attention
techniques: []
hardware_features: []
kernel_types:
- attention
languages:
- python
captured_at: '2026-04-17'
status: merged
merge_sha: 6f2f41c85b25ff4bce404dbdac5e45f4bb2512d3
inclusion_reason: kernel file changes
changed_paths:
- torch/_higher_order_ops/flex_attention.py
- torch/_inductor/kernel/flex_attention.py
head_ref_oid: a66ac077fd539bd3fdea95b2866595803ca19a0a
artifact_dir: evidence/pull-bundles/pytorch/gh-153641
---
# [FlexAttention] explicilty create grad_q w/ strides

- Repository: `pytorch/pytorch`
- PR: [153641](https://github.com/pytorch/pytorch/pull/153641)
- Decision: `kernel file changes`
- Reason: kernel file changes

## Changed Paths

- `torch/_higher_order_ops/flex_attention.py`
- `torch/_inductor/kernel/flex_attention.py`

## Evidence Bundle

`evidence/pull-bundles/pytorch/gh-153641`
