C++ API接口无法使用 c10_npu::device_count
收藏回复举报
C++ API接口无法使用 c10_npu::device_count
t('forum.solved') 已解决
发表于2024-08-12 17:53:06
0 查看

推理卡是300I Pro,我想使用Libtorch来进行AI推理,CANN 版本 7.0.1.1,Pytorch 版本 2.1.0,torch_npu已经编译成功。

torch_npu::init_npu和torch_npu::finalize_npu这两个API可以正常使用,但使用c10_npu::device_count 就会报错error: ‘c10_npu’ has not been declared;

https://www.hiascend.com/document/detail/zh/Pytorch/60RC2/apiref/apilist/ptaoplist_000942.html根据这里说明的定义文件,添加头文件#include <torch_npu/csrc/core/npu/NPUFunctions.h>后,报错fatal error: third_party/acl/inc/acl/acl_base.h: No such file or directory

我要发帖子