Lightning-AI / Lightning-AI/lightning-thunder

cuDNN SDPA executor does not support batched broadcast across attention heads mask

Open
#1,799 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. Pull the branch of https://github.com/Lightning-AI/lightning-thunder/pull/1798 if not merged yet.
  2. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.