已合并
docs: add ShapeEnv API support records to torch-fx.md across 5 version directories #37392
小辉懂编程创建于 6月2日
docs: add ShapeEnv API support records to torch-fx.md across 5 version directories #37392
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 小辉懂编程 的贡献)6月2日 关联了issue:【开源实习】Torch-NPU API一致性对齐:补齐测试用例、API功能对齐、补齐文档(20),[ShapeEnv] ignore_fresh_unbacked_symbols 在 v2.7.1 / v2.9.0 / v2.10.0 / v2.11.0 / v2.12.0 / master 上 NPU 适配无需修改说明
6月2日 关联了issue:【开源实习】Torch-NPU API一致性对齐:补齐测试用例、API功能对齐、补齐文档(20),[ShapeEnv] ignore_fresh_unbacked_symbols 在 v2.7.1 / v2.9.0 / v2.10.0 / v2.11.0 / v2.12.0 / master 上 NPU 适配无需修改说明
ascend-robot
6月2日 评论:
6月2日 评论:
6月2日 添加了label:ascend-cla/yes
ascend-robot
6月2日 评论:
6月2日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| docs | ✅ 李伟, molly123321 (2/2) | ✅ 李伟 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
gehui-2026, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了123条消息 查看更多
ascend-robot
6月10日 评论:
6月10日 评论:
流水线 PR-pipeline_pytorch#30851 已完成
| 阶段 | 任务名 | 状态 | 详情 |
|---|---|---|---|
| 编译构建 | Build_X86 | 🛑 | >>> |
| Build_ARM | 🛑 | >>> | |
| Build_LibTorch_x86 | 🛑 | >>> | |
| Build_LibTorch_ARM | 🛑 | >>> | |
| Build_X86_torchair | 🛑 | >>> | |
| Build_ARM_torchair | 🛑 | >>> | |
| patch_test | 🛑 | >>> | |
| 恶意代码检查 | Antipoison | ✅ | >>> |
| 编码安全与规范检查 | CodeCheck | ✅ | >>> |
| check_error | ✅ | >>> | |
| CodeCheck_lintrunner | ✅ | >>> | |
| 开源片段检查 | SCA | ✅ | >>> |
| 开发者测试 | UT_X86_Part_01 | 🛑 | >>> |
| UT_X86_Part_02 | 🛑 | >>> | |
| UT_ARM_A3_Part_01 | 🛑 | >>> | |
| UT_ARM_A3_Part_02 | 🛑 | >>> | |
| UT_ARM_A2_Part_01 | 🛑 | >>> | |
| UT_ARM_A2_Part_02 | 🛑 | >>> | |
| UT_ARM_A2_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_01 | 🛑 | >>> | |
| UT_inductor_Part_02 | 🛑 | >>> | |
| UT_inductor_Part_03 | 🛑 | >>> | |
| UT_inductor_Part_04 | 🛑 | >>> | |
| UT_DIST_ARM_Part_01 | 🛑 | >>> | |
| UT_DIST_ARM_Part_02 | 🛑 | >>> | |
| UT_DIST_ARM_Part_03 | 🛑 | >>> | |
| UT_DIST_ARM_Part_04 | 🛑 | >>> | |
| UT_ARM_A2_Select_Part_01 | 🛑 | >>> | |
| UT_ARM_A2_Select_Part_02 | 🛑 | >>> | |
| 流水线 | PR-pipeline_pytorch | ✅ | >>> |


6月10日 添加了label:approvedlgtm
6月10日 合入了pull request
ascend-robot
6月10日 评论:
6月10日 评论:
流水线 pytorch_gitcode_PR_multiVersion#10417 [ commitID:ecbdbdc2 ] 已完成


【关联任务】
【合入来源】
请勿携带内部流程信息。
【背景与目标】
完善 Torch-NPU 资料对
torch.fx.experimental.symbolic_shapes.ShapeEnv下 5 个 API 的覆盖记录。API 在 NPU 上的可用性已由配套测试 MR 完成验证,但docs/zh/native_apis/各版本torch-fx.md中缺失支持记录,本 PR 补齐。torch.fx.experimental.symbolic_shapes.ShapeEnv.produce_guardstorch.fx.experimental.symbolic_shapes.ShapeEnv.get_nontrivial_guardstorch.fx.experimental.symbolic_shapes.ShapeEnv.get_pruned_guardstorch.fx.experimental.symbolic_shapes.ShapeEnv.is_unbacked_syminttorch.fx.experimental.symbolic_shapes.ShapeEnv.ignore_fresh_unbacked_symbols【上游社区支持情况】
torch.fx.experimental.symbolic_shapes.ShapeEnv类公开方法produce_guards/get_nontrivial_guards在test/test_proxy_tensor.py中被覆盖;ignore_fresh_unbacked_symbols在 v2.9+ 的test_control_flow.py中间接使用;get_pruned_guards/is_unbacked_symint上游无直接用例torch-fx.md均无这 5 个 API 的记录【修改方案】
按规范「资料 PR 只合入 v2.7.1,但所有版本子目录的支持情况都要刷新」,在 5 个版本文档末尾各追加 5 行:
docs/zh/native_apis/pytorch_2-7-1/torch-fx.mddocs/zh/native_apis/pytorch_2-9-0/torch-fx.mddocs/zh/native_apis/pytorch_2-10-0/torch-fx.mddocs/zh/native_apis/pytorch_2-11-0/torch-fx.mddocs/zh/native_apis/pytorch_2-12-0/torch-fx.md新增表格行:
配套测试 MR
【资料变更】
本 PR 核心交付为资料补齐,5 个版本
torch-fx.md各 +5 行,不修改已有内容。【接口变更】
不涉及。仅 markdown 文档追加表格行。
【功能验证】
5 个 API 在 NPU 上的可用性由配套测试 MR 验证,资料行 "是支持" 与实测一致:
produce_guardstest_mega_guard(NPU 路径)get_nontrivial_guardstest_guards_equalget_pruned_guardstest_shape_env_get_pruned_guardsis_unbacked_syminttest_shape_env_is_unbacked_symintignore_fresh_unbacked_symbolstest_shape_env_ignore_fresh_unbacked_symbols文档格式验证:
for v in 2-7-1 2-9-0 2-10-0 2-11-0 2-12-0; do tail -7 docs/zh/native_apis/pytorch_$v/torch-fx.md done|API名称|是否支持|限制与说明|格式【CheckList】