ONNXRuntime i.MX 8M-Plus vsi_npu execution provider create vx tensor fail error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ONNXRuntime i.MX 8M-Plus vsi_npu execution provider create vx tensor fail error

ソリューションへジャンプ
4,432件の閲覧回数
jimmyc2
Contributor I
I’ve been having issues getting it to work with onnxruntime as documented in the NXP IMX Machine Learning User Guide.
 
I can confirm that the libvx_delegate works as expected and we see the hardware acceleration using tensorflow/tflite example, but when I try to run in onnxruntime using the vsi npu execution provider I get this error:
 
2022-06-28 20:43:12.921710951 [I:onnxruntime:, inference_session.cc:1329 Initialize] Session successfully initialized.
2022-06-28 20:43:12.979434216 [I:onnxruntime:, sequential_executor.cc:157 Execute] Begin execution
E [_init_tensor:461]Create vx tensor fail.
E [_create_tensor:540]Create vx tensor fail.
python3: ovxlib_delegate.cpp:839: int nnrt::OvxlibDelegate::addTensor(vsi_nn_graph_t*, vsi_nn_tensor_attr_t*, size_t, const void*, bool): Assertion `false' failed.

For information, I am using the 5.10.72_2.2.0 image and building ORT from source from https://source.codeaurora.org/external/imx/onnxruntime-imx/tree/?h=lf-5.10.72_2.2.0

The onnx graph being tested is the INT8 model from https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-12-int8.o...

Does ONNXRuntime actually work with INT8 and the VSI_NPU? The model in the guide (https://github.com/onnx/models/blob/main/vision/classification/mobilenet/model/mobilenetv2-7.onnx) is a FP32 model, which runs on CPU and will complete but defer back to the CPU if vsi_npu is selected.

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
4,398件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

According reply from R&D, VSI NPU execution provider in ONNX  support for quantized models is very limited (I would say none). And the Modelrunner only uses ONNX APIs too.

There is currently an ongoing migration from NNRT and nn-imx modules to TIM-VX and so as a part of this migration we expect the support for quantized ops. No estimates or dates for the delivery, it is a long-term plan roughly targeting the end of 2022.So, I advise ctms not to use onnxruntime.

Regards

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
4,399件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi,

According reply from R&D, VSI NPU execution provider in ONNX  support for quantized models is very limited (I would say none). And the Modelrunner only uses ONNX APIs too.

There is currently an ongoing migration from NNRT and nn-imx modules to TIM-VX and so as a part of this migration we expect the support for quantized ops. No estimates or dates for the delivery, it is a long-term plan roughly targeting the end of 2022.So, I advise ctms not to use onnxruntime.

Regards

0 件の賞賛
返信
3,495件の閲覧回数
mattcrossmarc
Contributor I

Can you please provide an update on support for NPU execution of onnx models?

Thanks,
Matt