Prhub

#29501 [NPU] [DOC] Fix and update Ascend NPU docs

原始 PR 作者 amote-i 合并时间 2026-06-27 18:23 文件变更 9 提交数 6 评论 6 代码增减 +45 / -23

执行摘要

修复 Ascend NPU 文档错误并更新特性

根据 PR 描述,动机包括两方面:

1) fix some issues found by skill(修复自动化工具发现的文档问题);
2) update new features supported by Ascend NPU(更新 NPU 后端支持的新特性文档)。

建议审阅者关注 accuracy_evaluation.mdx 中 SSL 解决方案的完整性,以及 environment_variables.mdx 中 DeepEP 描述的准确性。整体变更对用户友好,值得合并。

讨论亮点

review 过程中,gemini-code-assist[bot] 提出了三个问题:

  • 模型路径质疑:认为 Qwen/Qwen3-VL-30B-A3B-Instruct 可能不存在(因为 Qwen3 未发布),作者回复 'Not a problem',认为路径正确。
  • Python 路径泛化建议:建议将特定版本路径改为通用路径,作者回复路径可从 trace 中找到。
  • 文档链接相对路径建议:建议将绝对路径 /docs/developer_guide/benchmark_and_profiling 改回相对路径以兼容 GitHub 和 Docusaurus 构建,但未得到作者回复,最终 PR 保留了绝对路径。

实现拆解

  1. 修复准确性评估文档中的 SSL 问题:在 ascend_npu_accuracy_evaluation.mdx 中添加了稳定的解决方案(使用环境变量指定 CA bundle),同时保留了临时工作区,并增加了 Warning 和 Note 提示。
  2. 纠正环境变量描述:在 ascend_npu_environment_variables.mdx 中将 DeepEP 相关变量的描述从错误的 'ant-moving' 更正为正确的 'long-sequence token pipelining'。
  3. 更新 GLM-5.2 示例文档:添加了 frontmatter(标题和描述)、修正拼写、调整代码块标记、将文档链接改为绝对路径。
  4. 完善安装指南:在 ascend_npu.mdx 中添加 description 元数据,修复模型路径(添加 Hugging Face 命名空间),并优化措辞。
  5. 其他文件小修:在 FAQ、性能测试、分析、量化、特性支持等文档中修复了格式和表述问题。
文件 模块 状态 重要度
docs_new/docs/hardware-platforms/ascend-npus/ascend_npu_accuracy_evaluation.mdx NPU 文档 modified 3.75
docs_new/docs/hardware-platforms/ascend-npus/ascend_npu_environment_variables.mdx NPU 文档 modified 2.84
docs_new/docs/hardware-platforms/ascend-npus/ascend_npu_glm5.2_examples.mdx NPU 文档 modified 3.29

关键源码片段

docs_new/docs/hardware-platforms/ascend-npus/ascend_npu_accuracy_evaluation.mdx documentation

该文件变更量最大,新增了 SSL 证书错误的稳定解决方案和临时工作区说明,并增加了 Warning 和 Note 组件,显著提升了文档实用性和安全性提示。

以下片段展示了 SSL 解决方案的核心部分,包括临时工作区和稳定方法的对比,以及安全警告。

{/* 临时工作区:仅在测试环境使用! */}
**Temporary workaround (test only):**
Navigate to your Python environment's `site-packages/requests/sessions.py`,
find the `class Session` definition, and set `self.verify = False`.

<Warning>
This **disables TLS certificate validation globally** for the Python `requests` library.
Use it **only as a temporary diagnostic step** in isolated test environments —
never in production.
</Warning>

{/* 稳定解决方案:指定代理的 CA 证书 */}
**Stable solution:**
The error is caused by a corporate TLS proxy injecting a self-signed certificate.
Point `requests` to the proxy's CA bundle:

```shell
# Obtain the CA certificate from your network administrator
# Then set the environment variable:
export REQUESTS_CA_BUNDLE=/path/to/your-proxy-ca-bundle.crt


This is a common workaround for corporate proxy environments. If it does not resolve
your issue, consult your IT department — proxy configurations vary across organizations.

```

评论区精华

模型路径 Qwen3-VL-30B-A3B-Instruct 可能不存在 question

gemini-code-assist[bot] 指出 Qwen3 系列尚未发布,建议检查模型路径是否正确。

结论:作者回复 'Not a problem',认为路径正确,无需修改。 · 已解决

Python 版本专用路径泛化建议 question

gemini-code-assist[bot] 建议将 /usr/local/python3.11.14/... 路径改为通用描述,因为不同用户 Python 版本可能不同。

结论:作者回复该路径可以从 trace 输出中找到,因此保持特定路径。 · 已解决

文档链接相对路径 vs 绝对路径 设计

gemini-code-assist[bot] 建议使用相对路径(如 ../../developer_guide/benchmark_and_profiling.md)以兼容 GitHub 和 Docusaurus 构建,避免绝对路径在不同 base URL 下失效。

结论:没有明确回复,最终 PR 保留了绝对路径。该设计决策可能增加维护成本。 · unresolved

风险与影响

主要风险在于文档事实性错误和链接可用性。模型路径 Qwen/Qwen3-VL-30B-A3B-Instruct 在评论中被质疑可能不存在,但作者确认无误。文档链接从相对改为绝对路径可能在某些构建环境下失效。但整体为纯文档变更,风险较低。

影响范围限于 Ascend NPU 文档阅读者,包括开发者和部署运维人员。文档改进可降低用户困惑,提升 NPU 平台使用体验。不涉及代码逻辑,无性能或安全影响。

模型路径验证 绝对路径兼容性

关联 Issue

未识别关联 Issue

当前没有检测到明确关联的 Issue 链接,后续同步到相关引用后会出现在这里。

完整报告

参与讨论