Skip to content

[QNN-EP] Fix ONNX context model helper.#24271

Merged
HectorSVC merged 1 commit intomicrosoft:mainfrom
CodeLinaro:dev/minfhong/fix_ctx_model_helper
Apr 4, 2025
Merged

[QNN-EP] Fix ONNX context model helper.#24271
HectorSVC merged 1 commit intomicrosoft:mainfrom
CodeLinaro:dev/minfhong/fix_ctx_model_helper

Conversation

@minfhong-quic
Copy link
Contributor

Description

Fix the bug where the QNN EP generates an ONNX model with EP Context and fails to run.

Motivation and Context

When generating an ONNX model with QNN EP context where the input is scalar, the shape is not set, resulting in a null pointer and causing the subsequent run to fail.

- When dumping an ONNX model with EP Context, if a tensor is scalar, it
  will create a null tensor, causing subsequent runs to fail.
@HectorSVC HectorSVC added the ep:QNN issues related to QNN exeution provider label Apr 3, 2025
@HectorSVC
Copy link
Contributor

/azp run Linux QNN CI Pipeline,Windows x64 QNN CI Pipeline,Windows ARM64 QNN CI Pipeline,Linux Android Emulator QNN CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@HectorSVC
Copy link
Contributor

/azp run Big Models,Win_TRT_Minimal_CUDA_Test_CI,Windows CPU CI Pipeline,Windows GPU CUDA CI Pipeline,Windows GPU DML CI Pipeline,Windows GPU Doc Gen CI Pipeline,Windows GPU TensorRT CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@HectorSVC
Copy link
Contributor

/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline,Linux OpenVINO CI Pipeline

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@HectorSVC HectorSVC merged commit 1cb53d0 into microsoft:main Apr 4, 2025
62 of 76 checks passed
zhaoxul-qti pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Apr 17, 2025
### Description
<!-- Describe your changes. -->
Fix the bug where the QNN EP generates an ONNX model with EP Context and fails to run.

### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
When generating an ONNX model with QNN EP context where the input is scalar, the shape is not set, resulting in a null pointer and causing the subsequent run to fail.
@minfhong-quic minfhong-quic deleted the dev/minfhong/fix_ctx_model_helper branch June 27, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ep:QNN issues related to QNN exeution provider

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants