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

Enable user to set QNN HTP performance mode for every session run #19521

Merged
merged 14 commits into from
Feb 23, 2024

Conversation

HectorSVC
Copy link
Contributor

@HectorSVC HectorSVC commented Feb 14, 2024

Description

Currently, the QNN HTP performance mode is set during session creation, there's no way to change it afterwards. There's requirement to set it high performance mode for high priority request and set it back to low performance mode later to save the power when the incoming request is idle for example.

Now, still keeps the performance mode at the session level in QNN EP options which is used at the default one. Ort QNN EP will set it once if user set it.
And there are setting (qnn.htp_perf_mode and qnn.htp_perf_mode_post_run) in run option to change the performance mode before and after session run. There's recommended scenario that user set the mode to high performance mode before the the inference sun so that user can get the result back ASAP. And set the mode to low performance mode after the inference to save the power.

@HectorSVC HectorSVC marked this pull request as ready for review February 15, 2024 17:19
Copy link
Contributor

@pranavsharma pranavsharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The non-QNN changes look fine.

@HectorSVC
Copy link
Contributor Author

@zhangsibo1129 , @FFFrog , could you help to take a look at the changes in StreamExecutionContext, I hope it doesn't impact the CANN EP.

@FFFrog
Copy link
Contributor

FFFrog commented Feb 16, 2024

@zhangsibo1129 , @FFFrog , could you help to take a look at the changes in StreamExecutionContext, I hope it doesn't impact the CANN EP.

Thank you for mentioning it. I am on vacation and will give you feedback in time after reading this tomorrow.

@jywu-msft
Copy link
Member

jywu-msft commented Feb 16, 2024

python lint/format check is failing (not sure why it says python when the output is on basic_test.cc) #Resolved

@FFFrog
Copy link
Contributor

FFFrog commented Feb 17, 2024

@zhangsibo1129 , @FFFrog , could you help to take a look at the changes in StreamExecutionContext, I hope it doesn't impact the CANN EP.

@HectorSVC,Everything is ok for CANN EP, thank you again.

Copy link
Contributor

@jslhcl jslhcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@HectorSVC HectorSVC merged commit 4ab4976 into main Feb 23, 2024
94 checks passed
@HectorSVC HectorSVC deleted the qnn_power_cfg_run_option branch February 23, 2024 01:05
@chiwwang
Copy link

Oh, just a note that, DCVS can be enabled for power-efficient modes as QNN docs suggests.

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.

8 participants