Closed
[Bug-Report|缺陷反馈]:安装ops-transformer包后修改的torch-extension内容不生效 #7526
cheng_zhiweiAdd on  16 days agoClosed at  13 days ago
cheng_zhiwei
cheng_zhiweiCollaborators
16 days ago Create

Describe the current behavior / 问题描述 (Mandatory / 必填)

在PR中修改了torch-extension内容,使用CI出包ops-transformer包正常。
在已有newest CANN包路径下,使用如下指令安装patch的ops-transformer.run包发现torch-extension下的文件没有得到更新,而kernel等得到更新,会触发不匹配的问题。
安装指令:./cann-950-ops-transformer_9.3.0_linux-x86_64.run --full --install-path=./

查看是否生效的路径:${CANN_PATH}/cann/python/site-packages/cann_ops_transformer/ops/attention

Environment Information / 环境信息 (Mandatory / 必填)

CANN包版本:https://hdfs-ngx0.turing-ci.hisilicon.com/#/compilepackage/CI_Version/cann_eco/br_hisi_trunk_ai/202611

ops-transformer包:https://turing-ci.huawei.com/#/cb/build_history?change_id=I04ffc1562ba6d194d93d7721f4a3c1e48483a46a

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

1、安装已有A5 newest cann包(选择的是112newest版本)
2、覆盖安装ops-transformer.run包

Describe the expected behavior / 预期结果 (Mandatory / 必填)

cann包中已修改的metadata部分可以得到更新

覆盖安装后,${CANN_PATH}/cann/python/site-packages/cann_ops_transformer/ops/attention/下的torch-extension并没有得到更新

Special notes for this issue/备注 (Optional / 选填)

likedislike
cheng_zhiweicheng_zhiweiCollaborators
16 days ago Added label: bug-report
周云飞
周云飞Collaborators
16 days ago Comments:

安装后 torch-extension 文件未更新的原因还需要确认,可能涉及安装目标路径或安装包内容。

请补充两项信息,以便区分这两种情况:

  1. 执行安装命令时的工作目录,以及 ${CANN_PATH} 的值,确认 --install-path=./ 是否指向您检查的 CANN 环境。
  2. 一个未更新文件的相对路径及预期变更内容,并提供安装命令的输出日志,便于核对安装过程和包内文件。
likedislike
周云飞周云飞Collaborators
16 days ago Assign Leeshoujem as responsible person
cheng_zhiweicheng_zhiweiCollaborators
16 days ago Modify description of issue
AlmaAlmaCollaborators
15 days ago Associated pull request
CANN-robotCANN-robotCollaborators
13 days ago Close issue
CANN-robotCANN-robotCollaborators
13 days ago Added label: resolved
周云飞
周云飞Collaborators
13 days ago Comments:

已合入 PR #15958,调整 ops-transformer 的安装脚本:

  • 为 pip3 和 pip 安装命令增加 --upgrade,使覆盖安装时更新已有的 cann_ops_transformer,避免 torch-extension 内容停留在旧包。
  • pip 安装失败时保留错误输出并终止安装,不再直接复制 wheel 后继续报告成功;安装信息改为在文件安装成功后更新,避免失败时版本记录与实际文件不一致。

PR 描述中的覆盖安装验证显示,安装后的相关文件与新 wheel 一致。

关联 PR:PR #15958

likedislike