zhangrunze13
8d0c308ae2
fix(dynamo): correct compiler initialization test expectations
Co-authored-by: zhangrunze<zhangrunze13@huawei.com>
# message auto-generated for no-merge-commit merge:
!46892 merge fix/compiler-test-expectations into master
fix(dynamo): correct compiler initialization test expectations
Created-by: zhangrunze13
Commit-by: zhangrunze
Merged-by: ascend-robot
Description: <!--
PR描述模板更新日期:20260203
-->
# 【合入来源】
> <font color="red">**如有社区issue,请关联issue链接**</font>\
> <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font>
- [ ] 需求
- [ ] 问题单
- [x] issue/工单
- [ ] 重构优化
- [ ] 资料更新
https://gitcode.com/Ascend/pytorch/issues/5056
# 【修改方案】
修复 `test/dynamo/test_compile_trigger.py` 中两项与当前实现不一致的 UT 预期:
1. 修正 Inductor 补丁检查的版本分支。 PyTorch <2.15 时,检查 `GraphLowering.codegen_with_cpp_wrapper` 和 `CacheBase.get_system` 来自 NPU 兼容层;≥2.15 时,检查初始化前后方法引用保持不变,确认保留上游实现。
2. 修正 `has_triton` 的 CPU 检测预期。 测试辅助函数增加 `include_cpu` 参数,覆盖默认排除 CPU、显式启用 CPU、缺少 CPU backend、缺少 Triton 包及 CPU/NPU 同时可用等场景。
本次仅调整测试,不修改生产实现。
# 【资料变更】
不涉及
# 【接口变更】
不涉及
# 【功能验证】
不涉及
# 【CheckList】
> PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]
- [x] 代码注释完备,正确记录错误日志
- [x] 代码实现进行了返回值、空指针等校验
- [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等
- [x] PR持续集成流水线(CI)执行通过,代码检查无异常
See merge request: Ascend/pytorch!46892
2026-09-24 16:03:16 +08:00
..
2023-12-28 03:29:15 +00:00
2023-12-28 03:29:15 +00:00
2026-06-02 16:16:09 +08:00
2024-01-05 02:09:57 +00:00
2024-01-08 12:38:09 +00:00
2024-01-08 12:38:09 +00:00
2024-01-08 12:38:09 +00:00
2024-01-05 02:09:57 +00:00
2024-01-09 07:06:09 +00:00
2026-09-24 16:03:16 +08:00
2024-01-05 02:09:57 +00:00
2024-01-08 12:38:09 +00:00
2024-01-05 02:09:57 +00:00
2024-01-08 12:38:09 +00:00
2024-01-09 07:06:09 +00:00
2024-01-08 12:38:09 +00:00
2026-07-07 19:12:18 +08:00
2026-07-23 11:11:17 +08:00
2024-01-10 10:11:42 +00:00
2023-12-28 03:29:15 +00:00
2024-01-10 10:11:42 +00:00
2026-08-27 10:28:23 +08:00
2024-01-08 12:38:09 +00:00
2023-12-28 03:29:15 +00:00
2026-05-07 20:53:34 +08:00
2026-09-24 09:57:19 +08:00
2024-01-08 12:38:09 +00:00
2024-01-09 07:06:09 +00:00
2024-01-08 12:38:09 +00:00
2024-01-05 02:09:57 +00:00
2024-01-08 12:38:09 +00:00
2026-05-21 16:41:18 +08:00
2024-01-08 12:38:09 +00:00
2023-12-28 03:29:15 +00:00
2024-01-08 12:38:09 +00:00
2023-12-28 03:29:15 +00:00
2026-02-04 14:56:25 +08:00
2026-08-25 10:32:31 +08:00
2026-06-23 09:14:24 +08:00
2026-03-13 14:57:25 +08:00
2024-01-09 07:06:09 +00:00
2026-09-24 09:57:19 +08:00
2024-01-05 02:09:57 +00:00
2026-09-24 09:57:19 +08:00
2024-01-10 10:11:42 +00:00
2023-12-28 03:29:15 +00:00
2024-01-08 12:38:09 +00:00
2024-01-08 12:38:09 +00:00
2024-01-05 02:09:57 +00:00
2023-12-28 03:29:15 +00:00
2026-07-16 09:27:23 +08:00
2026-05-21 16:41:18 +08:00
2024-01-08 12:38:09 +00:00
2026-07-29 11:35:20 +08:00
2024-05-11 09:33:09 +00:00
2026-05-21 16:41:18 +08:00
2026-06-22 16:47:27 +08:00
2026-09-23 09:22:07 +08:00
2024-01-08 12:38:09 +00:00
2023-12-28 03:29:15 +00:00
2023-12-28 03:29:15 +00:00