Engine worker: bshd cp PR lead a conflict when NPU remove padding=Fasle
System Info
AssertionError: output.shape: torch.Size([1, 268]), attention_mask.shape: torch.Size([1, 1, 268, 268])
Information
- [ ] The official example scripts
- [x] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder (such as GLUE/SQuAD, ...) - [ ] My own task or dataset (give details below)
Reproduction
conflict PR: #5826 and #5768
PR-5768 change the NPU attention mask shape from (b,s) to (b,1,s,s) by preprocess_bshd method, but PR-5826 add an assert to make sure output.shape[:2] match attention mask shape, that break NPU code in bshd.
Furthermore, due to the input requirements of NPU Flash Attention, the attention mask in the NPU preprocessing is processed into a lower triangular matrix combining the padding mask and causal mask. However, the attention mask was reconstructed in the CP adaptation part, which makes it incompatible with the NPU Flash Attention input format.
BTW, I just found thd branch has the same problem😭.
Expected behavior
- [ ] I will submit a follow‑up PR to fix this issue.
BTW, I just found that thd branch has same problem, I'm afraid no one get there by NPU ever.🤣
I also had this problem.