Repository navigation
Commit bd435fd
committed
Qualcomm AI Engine Direct - Check passes_job for ResolveDebugHandle
to_edge_transform_and_lower_to_qnn, the QNN FP16 recipe and the other
QNN entry points run only the active passes listed in passes_job, and
the pass manager then checks that ResolveDebugHandle ran at the end. A
passes_job that lists only the passes to change, like
passes_job = {SomePass: {QCOM_PASS_ACTIVATE_KEY: False}}
leaves ResolveDebugHandle out, and failed there with a bare IndexError
(or an AssertionError) that did not say how to build a valid job. So
did a passes_job that turns ResolveDebugHandle off.
get_to_edge_transform_passes now raises a ValueError when passes_job
has no active ResolveDebugHandle, naming the dict to start from for
that backend, for example:
passes_job = QnnHtpPassManager.get_capture_program_passes()
passes_job[SomePass][QCOM_PASS_ACTIVATE_KEY] = False
A passes_job with an active ResolveDebugHandle, or a subclass of it,
goes through as before, including a reduced one that runs only the
passes it lists.
Test: a passes_job without ResolveDebugHandle, or with it turned off,
raises the ValueError naming the pass manager, also through the QNN
recipe, and a reduced one with it still yields exactly its passes.1 parent b6033c8 commit bd435fd
2 files changed
Lines changed: 51 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
386 | | - | |
| 386 | + | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
2129 | 2130 | | |
2130 | 2131 | | |
2131 | 2132 | | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
2132 | 2169 | | |
2133 | 2170 | | |
2134 | 2171 | | |
| |||
0 commit comments