已关闭
[Bug-Report|缺陷反馈]: 在matmul_story用例按 README 流程执行时, 报错缺少libhccl.so #153
yangyang016创建于 5月7日关闭于 5月8日
5月7日 添加了label:bug-report
5月7日 将 chen-shuai 设为负责人
zhangzijie
5月7日 评论:
5月7日 评论:
这个报错应该是torch和cann toolkit安装的问题,和samples代码关联不大


5月8日 关联了pull request:关闭torch自动加载后端组件(torch_npu等组件)
chen-shuai
5月8日 评论:
5月8日 评论:
脚本只依赖torch cpu,import torch后会自动加载torch_npu。torch_npu依赖了ops包的libhccl.so,导致只装toolkit包直接运行会报错找不到libhccl.so。关闭torch后端组件自动加载修复问题


5月8日 关闭了 issue
5月8日 添加了label:resolved
Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
一、问题描述 (必填)
在
matmul_story用例按 README 流程执行时,gen_data.py阶段因import torch失败,报错缺少libhccl.so,导致用例无法运行。典型报错日志:
补充说明:
matmul_story相关 README 中未明确声明需安装torch/torch_npu/HCCL运行依赖。二、环境信息 (可选)
9.0.0(ASCEND_HOME_PATH=/usr/local/cann-9.0.0)Ubuntu 24.04.3 LTSPython 3.12.9torch,触发torch_npu自动加载libhccl.so(/usr/local/cann-9.0.0/lib64下不存在)三、重现步骤 (可选)
source /usr/local/cann-9.0.0/set_env.shcmake -S . -B build_usr_local -DNPU_ARCH=dav-3510 cmake --build build_usr_local --parallel $(nproc) cmake --install build_usr_local --prefix ./build_outmatmul_story任一 README 推荐脚本(示例):cd Samples/2_Performance/matmul_story/matmul_tutorials bash scripts/run.sh --skip-build --target matmul_tutorial_mxfp4_swat_balance 256 256 256gen_data.py中import torch时失败,报libhccl.so缺失。同类问题在以下脚本也可复现:
Samples/2_Performance/matmul_story/matmul_tutorials/scripts/gen_data.pySamples/2_Performance/matmul_story/matmul_recipes/examples/matmul_a16w16/scripts/gen_data.pySamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/scripts/gen_data.pySamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp8/scripts/gen_data.py四、预期结果 (可选)
matmul_storyREADME 明确说明运行阶段对torch/torch_npu/HCCL的依赖与安装要求;或gen_data.py/run.sh增加前置依赖检查与友好错误提示;或torch_npu/HCCL 的数据生成兜底路径(至少用于基础样例跑通)。💡 备注(选填)