Skip to content

ort.InferenceSession fails silently #23869

Closed as not planned
Closed as not planned
@DavidLuong98

Description

@DavidLuong98

Describe the issue

onnxruntime-qnn :1.20.2

I am using python to profile the models. I have a sample code below :

provider_option = {
    'backend_path': 'QnnHtp.dll',
    'htp_performance_mode': 'sustained_high_performance',
    'htp_graph_finalization_optimization_mode': '3',
    'soc_model': '60',
    'htp_arch': '73'
}

try:
    return ort.InferenceSession(
        self.model_path,
        sess_options=sess_options,
        providers=['QNNExecutionProvider'],
        provider_options=[provider_option],
    )
except Exception as e:
    print("Error creating InferenceSession:", e)

ort.InferenceSession(..) fails silently without any explanation. It does not hit the exception either.

When running this with onnxruntime_perf_test.exe the console prints out :

:This is an invalid model. Type Error: Type 'tensor(double)' of input parameter ((..._output_0_quantized) of operator (DequantizeLinear) in node ((..._output_0_DequantizeLinear) is invalid.

Expected behavior is to have this throw the error above.

To reproduce

I am not able to share the model. I have a CNN model which I created dummy weights. From there, I ran the ORT code snippet above.

Urgency

Not urgent

Platform

Windows

OS Version

24H2

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.20.2

ONNX Runtime API

Python

Architecture

ARM64

Execution Provider

Other / Unknown

Execution Provider Library Version

QNN

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:QNNissues related to QNN exeution provider

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions