工具与软件:
嗨、团队:
我尝试使用 /edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py 将 onnx 文件转换为 TIDL 格式、
我从 averagepool 节点收到错误消息:
- 对象池已针对以下内核大小进行验证:3x3、2x2s、1x1、跨度1和跨度2 (水平和垂直尺寸)

但我的 onnx 模型跨度中的 averagepool 节点是2x2、
您能帮我检查一下这种症状吗?
感谢您的帮助。
此致、
肯尼亚
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
工具与软件:
嗨、团队:
我尝试使用 /edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py 将 onnx 文件转换为 TIDL 格式、
我从 averagepool 节点收到错误消息:

但我的 onnx 模型跨度中的 averagepool 节点是2x2、
您能帮我检查一下这种症状吗?
感谢您的帮助。
此致、
肯尼亚
大家好、 Chris Tsongas:
我的错误如下: 
我在 onnx 中的 avgpool 节点: 
我需要在 TDA4上评估模型的推理执行时间、因此我没有使用 Model Zoo 中的模型进行实验。
感谢 yoru 的帮助,
此致、
Ken
尊敬的 Ken:
我能看到模型吗? 这看起来不像一个错误、只是一个效率低下的问题。 如果要逐层查看性能数字、请首先将 DEBUG 设为4 (或更高)、然后查看 github.com/.../tidl_osr_debug.md 以设置并提取此信息。
此致、
Chris
大家好、 Chris Tsongas:
抱歉、我的模型供公司内部使用、无法共享。
我将与一起测试一个公共模型avgpool、并尽快提供给您。
此致、
Ken
大家好、 Chris Tsongas:
对不起,如何上传 onnx 文件给你?
插入-->影像/视频/文件上传失败。
我使用 avgpool (内核形状2x2)和 avgpool (内核形状1x1)测试 Alexnet 模型
内核2x2有错误:
[代码更改]
在 model_configs.py 中:
"alexnet0307": create_model_config(
source=AttrDict(
#model_url="">software-dl.ti.com/.../mobilenet_v1_1.0_224.tflite",
opt=True,
infer_shape=True,
),
preprocess=AttrDict(
resize=(224,224),
crop=(224,224),
data_layout="NCHW",
resize_with_pad=False,
reverse_channels=False,
),
session=AttrDict(
session_name="onnxrt",
model_path=os.path.join('/home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/ken_convert_model', "alexnet0307_kernel2.onnx"),
#model_path=os.path.join(models_base_path, "mobilenet_v1_1.0_224.tflite"),
input_mean=[0,0,0],
input_scale=[1,1,1],
input_optimization=True,
),
task_type="classification",
extra_info=AttrDict(num_images=numImages, num_classes=1000),
),
命令:python3 onnxrt_ep.py -c -m alexnet0307
感谢您的帮助。
此致、
Ken
大家好、 Chris Tsongas:
我的电子邮件是 ken.zhoung@emc.com tw
此致、
Ken
大家好、 Chris Tsongas:
我将3个文件上传至 Box、
1. alexnet0407_kernel2.onnx -->转换失败、通过 onnxrt_ep.py
2. alexnet0407.onnx / alexnet0307_u8.onnx -->可以通过 onnxrt_ep.py 转换通过,但运行推理失败以下日志:
"验证 TIDL 图形失败" 
我是否需要为问题2创建新问题?
感谢您的帮助。
此致、
Ken
测试 TIDL 版本10.00.08.00、然后在主机上运行。 下面是详细日志:
Running shape inference on model /home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/ken_convert_model/alexnet0307_kernel2.onnx
========================= [Model Compilation Started] =========================
Model compilation will perform the following stages:
1. Parsing
2. Graph Optimization
3. Quantization & Calibration
4. Memory Planning
============================== [Version Summary] ==============================
-------------------------------------------------------------------------------
| TIDL Tools Version | 10_00_08_00 |
-------------------------------------------------------------------------------
| C7x Firmware Version | 10_00_02_00 |
-------------------------------------------------------------------------------
| Runtime Version | 1.14.0+10000005 |
-------------------------------------------------------------------------------
| Model Opset Version | 11 |
-------------------------------------------------------------------------------
NOTE: The runtime version here specifies ONNXRT_VERSION+TIDL_VERSION
Ex: 1.14.0+1000XXXX -> ONNXRT 1.14.0 and a TIDL_VERSION 10.00.XX.XX
============================== [Parsing Started] ==============================
[TIDL Import] [PARSER] WARNING: Network not identified as Object Detection network : (1) Ignore if network is not Object Detection network (2) If network is Object Detection network, please specify "model_type":"OD" as part of OSRT compilation options
[TIDL Import] WARNING: Parameters - Kernel 11x11, Stride 4x4, dilation 1x1, Pad 2x2, Bias 1 in [Conv_0] has gone through limited verification
[TIDL Import] WARNING: Kernel size 11x11 with stride 4 in [Conv_0] has gone through limited verification
------------------------- Subgraph Information Summary -------------------------
-------------------------------------------------------------------------------
| Core | No. of Nodes | Number of Subgraphs |
-------------------------------------------------------------------------------
| C7x | 20 | 2 |
| CPU | 1 | x |
-------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------
| Node | Node Name | Reason |
--------------------------------------------------------------------------------------------------------------------
| AveragePool | AveragePool_15 | 3x3,2x2s,1x1 with stride 1 and stride 2 (both horizontal and vertical dimensions) |
--------------------------------------------------------------------------------------------------------------------
/home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/tidl_tools/tidl_graphVisualiser_runtimes.out: error while loading shared libraries: libcgraph.so.6: cannot open shared object file: No such file or directory
[TIDL Import] WARNING: System command failed with return code : 32512. Skipping Runtimes GraphViz.
============================= [Parsing Completed] =============================
==================== [Optimization for subgraph_0 Started] ====================
[TIDL Import] [PARSER] WARNING: Pad layer won't be merged in the succeeding layer, it will be treated as a stand alone layer
----------------------------- Optimization Summary -----------------------------
--------------------------------------------------------------------------------
| Layer | Nodes before optimization | Nodes after optimization |
--------------------------------------------------------------------------------
| TIDL_PadLayer | 1 | 1 |
| TIDL_ReLULayer | 5 | 0 |
| TIDL_ConvolutionLayer | 5 | 5 |
| TIDL_PoolingLayer | 3 | 3 |
--------------------------------------------------------------------------------
=================== [Optimization for subgraph_0 Completed] ===================
/home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/tidl_tools/tidl_graphVisualiser.out: error while loading shared libraries: libcgraph.so.6: cannot open shared object file: No such file or directory
[TIDL Import] WARNING: System command failed with return code : 32512. Skipping Graph Visualization.
[TIDL Import] WARNING: Parameters - Kernel 11x11, Stride 4x4, dilation 1x1, Pad 2x2, Bias 1 in [Conv_0] has gone through limited verification
[TIDL Import] WARNING: Kernel size 11x11 with stride 4 in [Conv_0] has gone through limited verification
The soft limit is 10240
The hard limit is 10240
MEM: Init ... !!!
MEM: Init ... Done !!!
0.0s: VX_ZONE_INIT:Enabled
0.9s: VX_ZONE_ERROR:Enabled
0.10s: VX_ZONE_WARNING:Enabled
0.2038s: VX_ZONE_INIT:[tivxInit:190] Initialization Done !!!
============= [Quantization & Calibration for subgraph_0 Started] =============
2025-03-18 01:59:06.986460611 [E:onnxruntime:, sequential_executor.cc:494 ExecuteKernel] Non-zero status code returned while running ReorderInput node. Name:'ReorderInput' Status Message: /root/onnxruntime/onnxruntime/contrib_ops/cpu/nchwc_ops.cc:17 virtual onnxruntime::common::Status onnxruntime::contrib::ReorderInput::Compute(onnxruntime::OpKernelContext*) const X_rank == 4 was false.
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py", line 385, in run_model
imgs, output, proc_time, sub_graph_time, height, width = infer_image(sess, input_images, config)
File "/home/ken/TIDL00.00.08.00/do_once/edgeai-tidl-tools/examples/osrt_python/ort/onnxrt_ep.py", line 202, in infer_image
output = list(sess.run(None, {input_name: input_data}))
File "/usr/local/lib/python3.10/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 200, in run
return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException: [ONNXRuntimeError] : 6 : RUNTIME_EXCEPTION : Non-zero status code returned while running ReorderInput node. Name:'ReorderInput' Status Message: /root/onnxruntime/onnxruntime/contrib_ops/cpu/nchwc_ops.cc:17 virtual onnxruntime::common::Status onnxruntime::contrib::ReorderInput::Compute(onnxruntime::OpKernelContext*) const X_rank == 4 was false.
MEM: Deinit ... !!!
MEM: Alloc's: 26 alloc's of 52459949 bytes
MEM: Free's : 26 free's of 52459949 bytes
MEM: Open's : 0 allocs of 0 bytes
MEM: Deinit ... Done !!!onnxruntime.capi.onnxruntime_pybind11_state.RuntimeException:[ONNXRuntimeError]: 6 : Runtime_exception :运行 ReorderInput 节点时返回非零状态代码。 名称:'ReorderInput'状态消息:/root/onnxruntime/onnxruntime/contrib_ops/cpu/nchwc_ops.cc:17 virtual onnxruntime::common::Status onnxruntime::contrib:ReorderInput::Compute (onnxruntime::OpKernelContext*) const X_rank == 4为 false。"
进行保存 alexnet0407_u8.onnx 可以使用进行转换 onnxrt_ep.py 在我这边。 但在对转换后的文件运行推理时、会遇到错误:
"验证 TIDL 图形失败" .
我的构建代码并运行推理步骤:
1. cd edgeai-tidl-tools 2. mkdir build && cd build 3. cmake -DFLAG2=2 –DTARGET_CPU=arm ../examples 4. make -j 5. ./bin/Release/ort_main -f /opt/model_zoo/<your_model>/artifacts/ -i /opt/edgeai-test-data/images/0003.jpg
我想问一下这是否是版本差异造成的。 我的版本是 10.00.08.00 、而您的版本是 10.1.4.0 ?
感谢您的帮助。
此致、
Ken
明白了。 我会更新 TIDL 版本并再次运行测试。 如果有任何问题、我将打开一个新问题。
我可以问哪个映像版本与 TIDL 10.01.04.00兼容吗?
感谢您的帮助。
此致、
Ken