Merged
fix(cake): 修复构建目录、pybind 调用与失败反馈 #301
fix(cake): 修复构建目录、pybind 调用与失败反馈 #301
Merged
liyinlongAdd on 23 days ago
liyinlong
liyinlong
23 days ago

描述

build_operator.py 从技能目录向上多退一层,把算子输出定位到插件父目录;pybind 路径还带有过时的 .claude/skills/ascendc_evaluation。因此插件 output/<op>/ 下的构建工程无法被找到,pybind 重建也会提前返回脚本缺失。修正路径后,原调用中的 --op 还会被 pybind CLI 拒绝。

以插件根目录解析 output/ 和子进程工作目录,以兄弟技能 ascendc-evaluation/scripts 定位绑定脚本,并将算子名作为位置参数传入。这与插件内 easyasc-codegen/scripts/regression_test.py 的目录及命令约定一致。绑定脚本遇到源码缺失或构建异常时返回非零退出码,调用方据此保留实际失败原因。

关联的Issue

Fixes #96

测试

  • 四项回归通过,覆盖构建目录查找、成功调用、源码缺失和构建失败。
  • 在含空格的临时插件目录中验证 output/add/AddCustom/build.sh 的查找。
  • 从插件外部工作目录调用真实 generate_pybind.py,验证参数解析、默认输出目录、绑定源码复制和构建入口调用。构建桥接与 pybind 两个 CLI 均真实执行,build.sh 与 setup.py 使用轻量测试脚本,验证范围为主机侧调用链。
  • 失败路径验证真实子进程返回状态和原始错误内容。
  • 改动文件的 pre-commit、Ruff、OAT 与 git diff --check 通过。
  • 当前提交 57f1092 的 CI #873 全部通过,包含代码检查与静态门禁。
python -m pytest -q plugins-community/collaborative-agent-kernel-evolution/tests/test_build_operator.py

当前PR是否有AI参与

  1. Agent平台信息:OpenAI Codex,codex-cli 0.167.0。
  2. 模型信息:gpt-6-astra。
  3. Prompt摘要:核查 CANNBot Issue #96,修复 CAKE 构建桥接脚本的插件根目录、兄弟技能路径与 pybind 参数,同时让绑定脚本在失败时返回非零退出码,以临时工程验证成功、源码缺失和构建失败的主机调用链。

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for liyinlong's contribution.)
liyinlongliyinlong
23 days ago Created pull request, commit 1b461f19
liyinlongliyinlong
23 days ago Associated issue: [Bug-Report|缺陷反馈]: build_operator.py 的 CAKE_ROOT 多退一层且技能目录名写成下划线,generate_pybind 永远找不到后只留一条 warning
CANN-robotCANN-robotCollaborators
23 days ago Added label: ai-co-authored
CANN-robotCANN-robotCollaborators
23 days ago Added label: cann-cla/yes
CANN-robot
CANN-robotCollaborators
23 days ago Comments:

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/cannbot ✅ 金炯, xutianze (2/2) ✅ 金炯, xutianze (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

lilong555, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
CANN-robotCANN-robotCollaborators
23 days ago Set qq_37913898,w00934874,dengguojie,jon_jin,rxtfeng,songkai111,xutianze,pingchuantang,hanrui22,wangzheng97,hedi0515,benwallace52,linghuis,OpSphere,zihengwang2 as approver
CANN-robotCANN-robotCollaborators
23 days ago Set qq_37913898,w00934874,dengguojie,jon_jin,rxtfeng,songkai111,xutianze,pingchuantang,hanrui22,wangzheng97,hedi0515,benwallace52,linghuis,OpSphere,zihengwang2 as approver
liyinlong
liyinlong
23 days ago Comments:

compile

likedislike
liyinlongliyinlong
23 days ago Pre merge succeeded (commit_id: 621225652e9256612986f5a97aa59229972710b6)
CANN-robot
CANN-robotCollaborators
23 days ago Comments:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robotCollaborators
23 days ago Added label: ci-pipeline-running
5 event messages are collapsed here。 See more
liyinlongliyinlong
22 days ago Modify description of pull request
jon_jin
jon_jinCollaborators
20 days ago Comments:

/lgtm
/approve

likedislike
jon_jin
jon_jinCollaborators
20 days ago Comments:
likedislike
CANN-robotCANN-robotCollaborators
20 days ago Added label: approved
xutianze
xutianzeCollaborators
20 days ago Comments:

/lgtm
/approve

likedislike
CANN-robotCANN-robotCollaborators
20 days ago Added label: lgtm
CANN-robotCANN-robotCollaborators
20 days ago Closed associated issue
CANN-robotCANN-robotCollaborators
20 days ago Merged pull request