Commit 8b81d9b
[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>1 parent 549d741 commit 8b81d9b
File tree
7 files changed
+202
-195
lines changed- onnxruntime
- core/providers/qnn
- builder
- test/providers/qnn
7 files changed
+202
-195
lines changedLines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1555 | 1555 | | |
1556 | 1556 | | |
1557 | 1557 | | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1558 | 1613 | | |
1559 | 1614 | | |
1560 | 1615 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
172 | 173 | | |
173 | 174 | | |
174 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
175 | 183 | | |
176 | 184 | | |
177 | 185 | | |
| |||
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
337 | 348 | | |
338 | 349 | | |
339 | 350 | | |
| |||
464 | 475 | | |
465 | 476 | | |
466 | 477 | | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
467 | 482 | | |
468 | 483 | | |
469 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
74 | 87 | | |
75 | 88 | | |
76 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
350 | 350 | | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
351 | 355 | | |
352 | 356 | | |
353 | 357 | | |
| |||
363 | 367 | | |
364 | 368 | | |
365 | 369 | | |
| 370 | + | |
| 371 | + | |
366 | 372 | | |
367 | 373 | | |
368 | 374 | | |
| |||
0 commit comments