onnxruntime
8b81d9b1 - [QNN-EP] - Tie HTP power config id lifetime to session (#26457)

Commit
10 days ago
[QNN-EP] - Tie HTP power config id lifetime to session (#26457) ### Description - Remove PerThreadContext (Only used for id management) - Create ManagedHtpPowerConfigId to manage destruction of id - Only create one htp power config id per session (previously was one per thread) ### Motivation and Context One session can potentially be used on multiple threads for execution, and there is a set max number of htp power config ids that can be used at any given time. If enough sessions and enough threads are created, then the maximum number of power config ids can be reached easily (see ticket). Additionally, all power configurations are available on a per-session basis. Therefore, there is no reason to have more than one power config id per session. Removal of PerThreadContext is due to the fact that it was only used to contain and destroy the power config ids on thread termination. As such, there is no more need for PerThreadContext. --------- Co-authored-by: quic_calvnguy <quic_calvnguy@quic_inc.com>
Author
Parents
Loading