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

Add capturestate / rundown ETW support logging for session and provider options #19397

Merged
merged 7 commits into from
Feb 8, 2024

Conversation

ivberg
Copy link
Contributor

@ivberg ivberg commented Feb 2, 2024

Description

Add capturestate / rundown ETW support logging for session and provider options.

Motivation and Context

Follow-up to #16259 and #18882

This is very useful when you have longer running ONNX sessions which will be the case for a lot of AI workloads. That means ETW tracing may start minutes or hours after a process & session has been established. When a trace is captured, you would want to know the state of ONNX at that time. The state for ONNX is session and config options so that they show up in the trace.

Tested with xperf and ORT
xperf -start ort -on 3a26b1ff-7484-7484-7484-15261f42614d
xperf -capturestate ort 3a26b1ff-7484-7484-7484-15261f42614d <--- Run this after session has been up for some time
xperf -stop ort -d .\ort.etl <- Trace will now also have rundown events

Also these will show if you use WPR CaptureStateOnSave

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg
Copy link
Contributor Author

ivberg commented Feb 2, 2024

Here is a WPA screenshot of just the snapshot / rundown events

image

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg
Copy link
Contributor Author

ivberg commented Feb 3, 2024

Remaining Linux test failure does not seem related to the PR at all. Rebase with main did not help.

@snnn

This comment was marked as outdated.

This comment was marked as outdated.

ivberg added a commit that referenced this pull request Feb 7, 2024
…ing (#19428)

### Description
Added docs for ONNX 1.17 covering logging, tracing, and QNN EP Profiling

### Motivation and Context
- ONNX Logging has not been documented
- ONNX Tracing with Windows has barely been documented
- ONNX 1.17 has new tracing and QNN EP Profiling

PRs: #16259,  #18201, #18882, #19397
@ivberg
Copy link
Contributor Author

ivberg commented Feb 7, 2024

Remaining Linux test failure does not seem related to the PR at all. Rebase with main did not help.

Thanks for re-running the test @snnn. It looks like the test passes now

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg ivberg requested a review from snnn February 7, 2024 23:28
@ivberg

This comment was marked as outdated.

This comment was marked as outdated.

@ivberg
Copy link
Contributor Author

ivberg commented Feb 8, 2024

/azp run Linux CPU CI Pipeline

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ivberg ivberg merged commit 148f54c into microsoft:main Feb 8, 2024
93 checks passed
YUNQIUGUO pushed a commit that referenced this pull request Feb 9, 2024
…er options (#19397)

### Description
Add capturestate / rundown ETW support logging for session and provider
options.

### Motivation and Context
Follow-up to #16259 and #18882

This is very useful when you have longer running ONNX sessions which
will be the case for a lot of AI workloads. That means ETW tracing may
start minutes or hours after a process & session has been established.
When a trace is captured, you would want to know the state of ONNX at
that time. The state for ONNX is session and config options so that they
show up in the trace.

Tested with xperf and ORT 
xperf -start ort -on 3a26b1ff-7484-7484-7484-15261f42614d
xperf -capturestate ort 3a26b1ff-7484-7484-7484-15261f42614d <--- Run
this after session has been up for some time
xperf -stop ort -d .\ort.etl  <- Trace will now also have rundown events

Also these will show if you use WPR [CaptureStateOnSave
](https://learn.microsoft.com/en-us/windows-hardware/test/wpt/capturestateonsave)
@ivberg ivberg deleted the user/ivberg/ETWRundown branch February 22, 2024 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants