support scaled_dot_product_attention for swin
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python, pytorch
- Domain
- computer-vision, machine-learning
Research direction
Start by reading the Swin shifted_window_attention entry point and the referenced PyTorch issue about Tensor attn_mask support. Run the existing Swin attention or model tests, then verify that supported cases use scaled_dot_product_attention while preserving behavior for the limitation described.
Written by the indexing model from the issue text.
Description
🚀 The feature
support torch.nn.functional.scaled_dot_product_attention for shifted_window_attention in swin
https://github.com/pytorch/vision/pull/8183
Motivation, pitch
torch.nn.functional.scaled_dot_product_attention is much more efficient. if we use large size window size, we can get the benefit of runtime
Limitation
currently torch.nn.functional.scaled_dot_product_attention doesn't support Tensor type for attn_mask.
https://github.com/pytorch/pytorch/issues/116237
Alternatives
No response
Additional context
No response
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Contributor guide
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.
More from pytorch/vision
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100