Skip to content

[Performance] LearningModelSession::Evaluate ToggleProfile() call breaks profiling #24507

@sheller-ms

Description

@sheller-ms

Describe the issue

The call to ToggleProfile in the LearningModelSession::Evaluate(), ends up turning off the existing profiling I enabled. The EndProfiling() that is called is global to my InferenceSession so it causes those profiling events to be turned off.

It is not clear why there is a Toggle and why it wouldn't be reset after this function call.

Link to Code

To reproduce

Do something that will load your Session Options to enable profiling, then execute where this LearningModelSession is used and see that the following Profiling does not work due to the change in enabled_ state.

Urgency

No response

Platform

Windows

OS Version

11

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

beb1a92

ONNX Runtime API

WinML

Architecture

ARM64

Execution Provider

DirectML

Execution Provider Library Version

No response

Model File

No response

Is this a quantized model?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    ep:DMLissues related to the DirectML execution providerperformanceissues related to performance regressionsstaleissues that have not been addressed in a while; categorized by a bot

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions