Closed
[Bug-Report|缺陷反馈]:安装ops-transformer包后修改的torch-extension内容不生效 #7526
cheng_zhiweiAdd on 16 days agoClosed at 13 days ago
16 days ago Added label: bug-report
周云飞
16 days ago Comments:
16 days ago Comments:
安装后 torch-extension 文件未更新的原因还需要确认,可能涉及安装目标路径或安装包内容。
请补充两项信息,以便区分这两种情况:
- 执行安装命令时的工作目录,以及
${CANN_PATH}的值,确认--install-path=./是否指向您检查的 CANN 环境。 - 一个未更新文件的相对路径及预期变更内容,并提供安装命令的输出日志,便于核对安装过程和包内文件。


16 days ago Assign Leeshoujem as responsible person
16 days ago Modify description of issue
15 days ago Associated pull request
13 days ago Close issue
13 days ago Added label: resolved
周云飞
13 days ago Comments:
13 days ago Comments:
已合入 PR #15958,调整 ops-transformer 的安装脚本:
- 为 pip3 和 pip 安装命令增加
--upgrade,使覆盖安装时更新已有的cann_ops_transformer,避免 torch-extension 内容停留在旧包。 - pip 安装失败时保留错误输出并终止安装,不再直接复制 wheel 后继续报告成功;安装信息改为在文件安装成功后更新,避免失败时版本记录与实际文件不一致。
PR 描述中的覆盖安装验证显示,安装后的相关文件与新 wheel 一致。
关联 PR:PR #15958


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部分可以得到更新
Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
覆盖安装后,${CANN_PATH}/cann/python/site-packages/cann_ops_transformer/ops/attention/下的torch-extension并没有得到更新
Special notes for this issue/备注 (Optional / 选填)