Closed
[FlexAttention] 清理冗余逻辑并支持 scalar remainder #4284
stonexxxAdd on  Aug 22Closed at  Sep 20
stonexxx
stonexxxCollaborators
Aug 22 Create

背景

整理 FlexAttention kernel 同步提交,清理未使用的 BlockMask cast 和冗余逻辑,并补齐短序列与 custom mod 标量余数场景支持。

修改范围

  • 清理未使用的 BlockMask cast。
  • 补齐短序列 fallback。
  • 支持 custom mod 标量余数处理及精度适配。
  • 保留当前 master 所需的 NPU compile-option forwarding。

验收条件

  • 受影响 Python 文件可通过 compileall。
  • squash 前后最终代码 tree 保持一致。
  • 不引入设计文档或测试文件提交。

关联 PR

likedislike
stonexxxstonexxxCollaborators
Aug 22 associated Kanban: FrameworkPTAdapter 版本issue看板
TorchNPU-BotTorchNPU-BotCollaborators
Aug 22 Added label: triage-review
TorchNPU-Bot
TorchNPU-BotCollaborators
Aug 22 Comments:

issue待分派,添加triage-review标签

likedislike
chenrayray
chenrayrayCollaborators
Sep 20 Comments:

因为FlexAttention 冗余逻辑清理与 scalar remainder 支持已有对应交付,对应 PR !45136 已合入,所以先关闭此 issue。如仍有问题或需要继续跟进,请补充具体情况并重新打开。

likedislike
chenrayraychenrayrayCollaborators
Sep 20 changed custom state from TODO to DONE
ascend-robotascend-robotCollaborators
Sep 20 Added label: resolved
chenrayraychenrayrayCollaborators
Sep 20 Close issue
chenrayraychenrayrayCollaborators
Sep 20 Added label: resolved
chenrayraychenrayrayCollaborators
Sep 24 Associated milestone: v26.2.0