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

Dynamo export and improve benchmark script for SAM2 encoder #23887

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

tianleiwu
Copy link
Contributor

Description

  • Add dynamo export for Sam2 image encoder
  • Verify fp32 onnx model with CPU EP (to avoid error message from TRT EP).
  • Update benchmark script:
    • output ORT profiling
    • output torch compiled code and unique kernel name for compiled kernel
    • add an option for nightly package installation
    • uninstall existing ort packages before installing

The node metadata of dynamo exported model can help mapping node in onnx model back to pytorch modeling script. Currently, the graph optimization is not done on dynamo exported model, so it is experimental right now.

Motivation and Context

To support profiling of torch compiled CUDA kernel.

apsonawane
apsonawane previously approved these changes Mar 4, 2025
@tianleiwu tianleiwu merged commit 5e636a6 into main Mar 5, 2025
88 of 97 checks passed
@tianleiwu tianleiwu deleted the tlwu/sam2_dynamo_and_update_profiling branch March 5, 2025 23:13
guschmue pushed a commit that referenced this pull request Mar 6, 2025
### Description
* Add dynamo export for Sam2 image encoder
* Verify fp32 onnx model with CPU EP (to avoid error message from TRT
EP).
* Update benchmark script:
  - output ORT profiling
- output torch compiled code and unique kernel name for compiled kernel
  - add an option for nightly package installation
  - uninstall existing ort packages before installing

The node metadata of dynamo exported model can help mapping node in onnx
model back to pytorch modeling script. Currently, the graph optimization
is not done on dynamo exported model, so it is experimental right now.

### Motivation and Context

To support profiling of torch compiled CUDA kernel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants