onnxruntime icon indicating copy to clipboard operation
onnxruntime copied to clipboard

[Feature Request] 2024-05-09 07:05:28.107324198 [E:onnxruntime:Default, cann_call.cc:139 CannCall] CANNGRAPH failure -1: GRAPH_FAILED ; NPU=0 ; hostname=d5624f2a4431 ; expr=ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph); 2024-05-09 07:05:28.108008819 [E:onnxruntime:, sequential_executor.cc:516 ExecuteKernel] Non-zero status code returned while running main_graph_12023255667024707207_0 node. Name:'CANNExecutionProvider_main_graph_12023255667024707207_0_0' Status Message: CANN Graph error executing ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph)

Open unmannedsupz opened this issue 1 year ago • 1 comments

Describe the feature request

2024-05-09 07:05:28.107324198 [E:onnxruntime:Default, cann_call.cc:139 CannCall] CANNGRAPH failure -1: GRAPH_FAILED ; NPU=0 ; hostname=d5624f2a4431 ; expr=ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph); 2024-05-09 07:05:28.108008819 [E:onnxruntime:, sequential_executor.cc:516 ExecuteKernel] Non-zero status code returned while running main_graph_12023255667024707207_0 node. Name:'CANNExecutionProvider_main_graph_12023255667024707207_0_0' Status Message: CANN Graph error executing ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph)

Describe scenario use case

2024-05-09 07:05:28.107324198 [E:onnxruntime:Default, cann_call.cc:139 CannCall] CANNGRAPH failure -1: GRAPH_FAILED ; NPU=0 ; hostname=d5624f2a4431 ; expr=ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph); 2024-05-09 07:05:28.108008819 [E:onnxruntime:, sequential_executor.cc:516 ExecuteKernel] Non-zero status code returned while running main_graph_12023255667024707207_0 node. Name:'CANNExecutionProvider_main_graph_12023255667024707207_0_0' Status Message: CANN Graph error executing ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph)

unmannedsupz avatar May 09 '24 07:05 unmannedsupz

Please provide more information about this issue. E.g., how to reproduce it.

edgchen1 avatar May 16 '24 17:05 edgchen1

@unmannedsupz I encountered the same issue, have you solved it?

santlchogva avatar Jan 08 '25 02:01 santlchogva

Oddly enough, this problem occurs when the Pyinstaller is packaged and the source code is executed without errors.

onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running torch-jit-export_7873117747986865089_0 node. Name:'CANNExecutionProvider_torch-jit-export_7873117747986865089_0_0' Status Message: CANN Graph error executing ge::aclgrphParseONNXFromMem(string_model.data(), string_model.size(), parser_params, graph)

ascend will result in the following error:

[ERROR] GE(24165,http_service):2025-03-16-15:36:39.981.036 [host_cpu_engine.cc:282]24165 LoadLib: ErrorNo: 1343225860(Internal errors) [INIT][DEFAULT][Invoke][DlOpen] failed. path = /usr/local/Ascend/ascend-toolkit/8.0.RC2/opp/built-in/op_impl/host_cpu/libops_host_cpu.so, error = /usr/local/Ascend/ascend-toolkit/8.0.RC2/opp/built-in/op_impl/host_cpu/libops_host_cpu.so: undefined symbol: _ZN2ge14GetShapeErrMsgEjRKSsS1_
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.133.467 [onnx_parser.cc:486]24559 TransNodeToOperator: ErrorNo: 1343225860(Internal errors) [COMP][PARSER][Creat][Op] IR for op[Conv_0] optype[PartitionedCall] is not registered.
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.133.483 [onnx_parser.cc:649]24559 ParseAllNodeProto: ErrorNo: 1343225860(Internal errors) [COMP][PARSER][Trans][Node] Trans node to operator for Conv_0:PartitionedCall failed.
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.133.562 [onnx_parser.cc:1020]24559 ModelParseToGraphImpl: ErrorNo: 1343225860(Internal errors) [COMP][PARSER][Parse][AllNodeProto] failed.
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.133.623 [onnx_parser.cc:918]24559 ModelParseToGraph: ErrorNo: 1343225860(Internal errors) [COMP][PARSER][Parse][Model] Model parse to graph failed, graph name:domi_default_20250316153654_0.
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.134.025 [onnx_parser.cc:1100]24559 ParseFromMemory: ErrorNo: 4294967295(failed) [COMP][PARSER][Parse][Model] To Graph failed.
[ERROR] GE(24165,http_service):2025-03-16-15:36:54.134.482 [onnx_parser.cc:152]24559 aclgrphParseONNXFromMem: ErrorNo: 4294967295(failed) [COMP][PARSER][Parser][Graph] domi_default_20250316153654_0 failed.

flipped-1121 avatar Mar 16 '25 07:03 flipped-1121

@flipped-1121 I have encountered the same problem. Have you solved it? Thanks.

moliyadi avatar Apr 27 '25 09:04 moliyadi

@flipped-1121 I have encountered the same problem. Have you solved it? Thanks.

Analysis of the undefined symbol Error

When the binary launches, PyInstaller’s bundled .so modules are loaded first, which precludes the driver library’s .so from being resolved and thus causes inference to fail.

Resolution

I ultimately abandoned onnxruntime_cann and instead:

  1. Converted the ONNX model to the OM format with ATC
  2. Loaded the OM model for inference, following the CANN Community Edition Developer Guide
  3. Packaged the application with PyInstaller—this time, it ran successfully without any symbol errors.

flipped-1121 avatar Apr 27 '25 09:04 flipped-1121