NVIDIA / NVIDIA/TransformerEngine

How to Perform Full Cross-Attention with CP Enabled and Padding Mask

Open
#1,915 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

attention
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

Open the contributing guide

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.