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

Performance degrade after sess_options.enable_profiling = True #267

Open
Jay19751103 opened this issue Oct 2, 2023 · 1 comment
Open

Comments

@Jay19751103
Copy link

Jay19751103 commented Oct 2, 2023

Hi @xiaowuhu

Using the tool referred in https://onnxruntime.ai/docs/performance/tune-performance/profiling-tools.html
I measure stable diffusion with specify sess_options.enable_profiling = True
before add it . I get 22.40it/s, after enabling it . I just can achieve 10.45. performance degrading from 22.40 to 10.45.

Could it be improved ?
Following is measured data

image

Another question is that I have two configurations, before enable profiling

config A is 22.40 it/s , config B is 20.23 it/s
but after turn on the profiling with sess_options.enable_profiling = True
config A is 10.45 it/s, config B is 11.03 it/s

Since the total number operations is different, I'm not sure it affect performance measuring or not
config A is 56250 counts to measure
config B is 49800 counts to measure.

@xadupre
Copy link
Member

xadupre commented May 20, 2024

When you profile a model, you should exclude the first iteration when aggregating the metrics. This one slower as it tries to do some optimization (allocations, ...)

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

No branches or pull requests

2 participants