Pull Request已成功合入, 合并人@CANN-robot
(感谢 KaranocaVe 的贡献)变更摘要
本次变更针对两个实验环境脚本 env_custom_opp.sh 的 CRLF 行尾问题,将 reduce-priority-queue(reduce_lab/scripts/env_custom_opp.sh)与 MoE-sort(moe_sort_lab/scripts/env_custom_opp.sh)两个脚本由 CRLF 转换为 LF 行尾。脚本内容本身未发生任何变动,命令与环境行为保持不变,仅通过统一行尾使其可被 bash -n 正确解析并正常 source,从而加载生成的 custom OPP 环境。
主要改动
- 行尾格式统一:两个
env_custom_opp.sh的全部行均由 CRLF 改为 LF,消除 source 时出现的$'\r': command not found及bash -n失败问题。 - 脚本加载入口修复:
#!/bin/bash及SCRIPT_DIR/PROJECT_DIR路径解析相关行改为 LF,使脚本能被文档构建流程正常加载。 - 环境变量设置保持一致:
ASCEND_HOME_PATH、ASCEND_CUSTOM_OPP_PATH、LD_LIBRARY_PATH的导出逻辑与source "$SET_ENV_SCRIPT"调用内容保持不变,仅行尾变化。 - 输出提示保持一致:脚本末尾
echo "ASCEND_HOME_PATH=..."、echo "ASCEND_CUSTOM_OPP_PATH=..."等提示行同样仅作行尾转换,未改变行为。


Hi @KaranocaVe, welcome to submitting your first PR to cann-learning-hub!
PR Merge Steps
1. CLA Signing
If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.
2. CI Check
Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.
3. Code Review
After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.


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.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-cann/cann-learning-hub | ✅ fuyangchenghu, waimaidaole (2/2) | ✅ fuyangchenghu (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
KaranocaVe, thanks for your pull request. All authors of the commits have signed the CLA. 👍


/compile


| 🚀 CI 流水线已启动 |
|---|
| 📋 执行详情: 点击查看流水线 |


/lgtm
/approve


修复两个实验环境脚本的 CRLF 行尾问题
描述
reduce-priority-queue 和 MoE-sort 实验使用的
env_custom_opp.sh均以 CRLF 保存。bash -n会以状态码 2 失败,source 时报告$'\r': command not found,导致文档中的构建流程无法加载生成的 custom OPP 环境。将这两个脚本转换为 LF 行尾,不改变命令或环境行为。
测试
bash -n。ASCEND_CUSTOM_OPP_PATH均正确设置。master,diff 仅包含行尾变化。这些检查覆盖 shell 启动流程,不代表算子编译通过。
文档更新
无需修改;现有实验文档已包含 source 和构建步骤。
类型标签
关联 Issue: https://gitcode.com/cann/cann-learning-hub/issues/771