Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ORT_ENABLE_ALL works in Python but not in C++ #22582

Closed
simon-eisenmann-driveblocks opened this issue Oct 24, 2024 · 0 comments
Closed

ORT_ENABLE_ALL works in Python but not in C++ #22582

simon-eisenmann-driveblocks opened this issue Oct 24, 2024 · 0 comments

Comments

@simon-eisenmann-driveblocks

Describe the issue

I am using an ONNX model in a C++ ROS2 node. When setting the optimization level to ORT_ENABLE_ALL, I encounter the following error (both CPU and CUDA):

[ml_detection_cpp_ros-1] 2024-10-24 14:05:24.694433895 [I:onnxruntime:, graph_transformer.cc:15 Apply] GraphTransformer GemmActivationFusion modified: 0 with status: OK
[ml_detection_cpp_ros-1] 2024-10-24 14:05:24.694575790 [I:onnxruntime:, graph_transformer.cc:15 Apply] GraphTransformer MatMulIntegerToFloatFusion modified: 0 with status: OK
[ml_detection_cpp_ros-1] 2024-10-24 14:05:24.694695104 [I:onnxruntime:, graph_transformer.cc:15 Apply] GraphTransformer DynamicQuantizeMatMulFusion modified: 0 with status: OK
[ml_detection_cpp_ros-1] 2024-10-24 14:05:24.694768165 [V:onnxruntime:, selector_action_transformer.cc:126 MatchAndProcess] Matched Conv
[ERROR] [ml_detection_cpp_ros-1]: process has died [pid 173062, exit code -6, cmd

This issue does not occur when using ORT_ENABLE_BASIC, and the node works fine. Interestingly, the same model works without issues (can perform inference) in a Python script with ORT_ENABLE_ALL. I would like to understand why there is a discrepancy between the C++ and Python implementations.

Any insights into why this might be occurring or suggestions for additional debugging would be helpful.

To reproduce

When I launch the C++ ROS2 node, I get the above mentioned error when optimizing the model with ORT_ENABLE_ALL:

session_options_ = Ort::SessionOptions();
session_options_.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_ALL);

Urgency

The issue is urgent because of a project deadline.

Platform

Linux

OS Version

Ubuntu 22.04.5 LTS

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.18.0

ONNX Runtime API

C++

Architecture

X64

Execution Provider

CUDA

Execution Provider Library Version

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant