Skip to content

QNN Execution Provider : Serializer::SerializeEventsToQnnLog is called with "profiling_level" set to detailed #27303

@john-dance

Description

@john-dance

Describe the issue

SerializeEventsToQnnLog should only be called when profiling_level is set to optrace, but it is called when profiling _level is set to detailed. This can lead to errors because the host application hasn't been set up for optracing output.

qnn_backend_manager.cc properly initializes the the QnnProfile_Config_t (see qnn_backend_manager.cc : line 818+), but then calls SerializeEventsToQnnLog without checking enable_optrace.

Why does this matter? ... because if you also use skip_qnn_version_check, you can get into a situation where optracing isn't supported and systemProfileCreateSerializationTarget fails.

Also,
onnxruntime_c_api.h - * "profiling_level": QNN profiling level. needs updating
onnxruntime/test/onnx/main.cc : line 568 needs updating

To reproduce

Set profiling to detailed and then watch SerializeEventsToQnnLog get called.

Urgency

No response

Platform

Android

OS Version

16

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.24

ONNX Runtime API

C++

Architecture

ARM64

Execution Provider

Other / Unknown

Execution Provider Library Version

QNN 2.37.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:QNNissues related to QNN exeution providerplatform:mobileissues related to ONNX Runtime mobile; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions