NVIDIA / NVIDIA/TransformerEngine
How to Perform Full Cross-Attention with CP Enabled and Padding Mask
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 831
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 65
Description
I have a query q and a pair of key-value kv, and I want to perform full cross-attention on them with CP enabled. However, the lengths of the tensors are not multiples of cp * 2, so I applied padding and passed in a mask. I also set AttnMaskType to padding. However, I encountered an issue: enabling CP and selecting AttnMaskType as padding is not supported simultaneously. How should I set the parameters to achieve this?
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.
Research direction
No source file or test is named. Start by reproducing the cross-attention setup with CP enabled, padded query/key-value lengths, a padding mask, and AttnMaskType set to padding; then trace the validation that rejects this combination. Done means identifying supported parameter settings or documenting that the combination is unsupported with a verified workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100