已合并
add t5 config #44029
add t5 config #44029
已合并
lihui创建于 11 天前
lihui
lihui成员
11 天前

【合入来源】

如有社区issue,请关联issue链接
https://gitcode.com/Ascend/pytorch/issues/3416
请勿携带内部流程信息(需求链接、问题单、内部issue等)

  • 需求
  • 问题单
  • issue/工单
  • 重构优化
  • 资料更新

【修改方案】

在npu_support.py里面针对T5网络增加dropout算子保序副作用

【资料变更】

【接口变更】

不涉及

【功能验证】

本地验证通过

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

  • 代码注释完备,正确记录错误日志
  • 代码实现进行了返回值、空指针等校验
  • PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
  • PR持续集成流水线(CI)执行通过,代码检查无异常
likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 lihui 的贡献)
lihuilihui成员
11 天前 创建了 pull request,commit dc3e8cb4
atomgit-bot
atomgit-bot
11 天前 评论:

变更摘要

此 PR 将 native_dropout 操作的副作用注册(_register_effectful_op)从全局的 torch_npu/_inductor/dvm/decomp.py 迁移到 benchmarks/torchbench/npu_support.py 中 T5 模型的专用补丁函数 _patch_model_24 内,缩小了该注册的影响范围,使其仅在 T5 模型的 benchmark 测试场景下生效。

主要改动

  • native_dropout 副作用注册位置迁移:将 _register_effectful_op(torch.ops.aten.native_dropout.default, _EffectType.ORDERED)torch_npu/_inductor/dvm/decomp.py 的全局初始化代码中移除,改为在 benchmarks/torchbench/npu_support.py_patch_model_24 函数内执行,使该注册仅对 T5 模型生效。
  • 移除 decomp.py 中的相关导入:删除了 torch_npu/_inductor/dvm/decomp.py 中从 torch._higher_order_ops.effects 导入的 _EffectType_register_effectful_op,避免全局引入不必要的副作用注册。
likedislike
atomgit-bot
atomgit-bot
11 天前 评论:

代码审查

✅ 未发现问题

likedislike
ascend-robotascend-robot成员
11 天前 添加了label:ascend-cla/yes
此处折叠了48条消息 查看更多
daifu1234567成员
7 天前 评论:

/lgtm

likedislike
ascend-robotascend-robot成员
7 天前 添加了label:lgtm
ascend-robotascend-robot成员
7 天前 删除了label:ci-pipeline-passed
ascend-robotascend-robot成员
7 天前 合入了pull request
ascend-robot
ascend-robot成员
7 天前 评论:
流水线 pytorch_gitcode_PR_multiVersion#13850 [ commitID:4acbc06b ] 运行失败
likedislike