×

签到

分享到微信

打开微信,使用扫一扫进入页面后,点击右上角菜单,

点击“发送给朋友”或“分享到朋友圈”完成分享

【Pytorch Yolact模型在线推理】mlu270在线推理量化模型报错 xgs07052023-05-08 15:01:33 回复 5 查看 技术答疑 使用求助 经验交流
【Pytorch Yolact模型在线推理】mlu270在线推理量化模型报错
分享到:


【寒武纪硬件产品型号】:MLU270


【使用操作系统】:ubuntu18.04


【使用驱动版本】: v4.9.2


【出错信息】:

[ERROR][/pytorch/catch/torch_mlu/csrc/aten/core/tensor_util.cpp][line:13][getMluTensorImpl][thread:140022937540416][process:17212]:
The device type of tensor is not 'mlu'.
Please check the python code where the 'result = mlu_model(input)' is called.
Please make sure the input.device is 'device(type='mlu', index=0)'.

dynamic_cast to MLUTensorImpl failed
[WARNING][/pytorch/catch/torch_mlu/csrc/aten/operators/op_methods.cpp][line:95][add][thread:140022937540416][process:17212]:
add Op cannot run on MLU device, start running on CPU!


我正在进行YOLACT实例分割网络的部署,目前量化模型在cpu上运行推理没有发现问题,但是在mlu上推理就出现了问题,补充一点:我将yolact的模型输出设置为一个list,其中包含5个tensor,不知道这样的输出会不会引起什么问题。


另外,我已经设置了quantized_model.to(ct.mlu_device())和input.to(ct.mlu_device())

并且打印input的device信息为: batch device:  mlu:0


请问:

1、在现在的情况下,为何会有报错,说我的input设备不正确?

2、dynamic_cast to MLUTensorImpl failed是什么原因造成的?

3、[WARNING][/pytorch/catch/torch_mlu/csrc/aten/operators/op_methods.cpp][line:95][add][thread:140022937540416][process:17212]:
add Op cannot run on MLU device, start running on CPU! 为何会出现这句报错?add算子明明是支持的,是因为在某个add算子被调用时,它的输入没有在mlu上而是被传到cpu上了吗?

4、模型输出包含5个tensor的list会引起上面的问题吗?

版权所有 © 2024 寒武纪 Cambricon.com 备案/许可证号:京ICP备17003415号-1
关闭