Closed
[FlexAttention] 对齐 score mod 与 Torch 2.13 接口 #4289
stonexxxAdd on  Aug 22Closed at  Sep 20
stonexxx
stonexxxCollaborators
Aug 22 Create

背景

社区 FlexAttention 接口在 Torch 2.13 中发生调整,同时 identity score_mod 和动态 shape 路由需要兼容修复。

修改范围

  • 修正显式及默认 identity score_mod 的路由与模板处理。
  • 补齐动态 shape 场景兼容修复。
  • 对齐 Torch 2.13 模板输出、辅助函数和 lowering 接口。

验收条件

  • 受影响 Python 文件可通过 compileall。
  • FlexAttention tiling 约束与候选排序 smoke test 通过。
  • 不引入设计文档或测试文件提交。

本 issue 对应 rebase_sync_master 拆分序列的第 6/6 个。

关联 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:

该需求已有实现。score_mod 对齐 Torch 2.13 的修改已通过 PR 45141 合入 master。因此先关闭此 issue。若仍有未满足的场景或问题,欢迎重新打开,并补充硬件型号、PyTorch/torch_npu/CANN 版本、复现步骤或最小示例及日志,以便继续跟进。

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