Lightning-AI / Lightning-AI/lightning-thunder
cuDNN SDPA executor does not support batched broadcast across attention heads mask
Open
Nobody has claimed this yet.
cudnn
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
🐛 Bug
To reproduce:
- Pull the branch of https://github.com/Lightning-AI/lightning-thunder/pull/1798 if not merged yet.
- Run the test added in https://github.com/Lightning-AI/lightning-thunder/pull/1798 (
pytest thunder/tests/test_cudnn_executor.py::test_make_cudnn_sdpa_backward_graph_with_mask):
https://github.com/Lightning-AI/lightning-thunder/blob/839d65f5d5f5205d25de766a95d35b0c21100593/thunder/tests/test_cudnn_executor.py#L65-L72
Supporting this case is required for batched packed sequences (https://github.com/Lightning-AI/lightning-thunder/issues/1758).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by checking the test added in PR 1798, thunder/tests/test_cudnn_executor.py::test_make_cudnn_sdpa_backward_graph_with_mask, and run it against the referenced branch or commit. Trace the cuDNN SDPA executor behavior for a mask broadcast across attention heads; done means the test passes and batched packed-sequence support is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- backend, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100