Skip to content

Commit 6e83abf

Browse files
committed
Resolved something typo
1 parent 2699ee1 commit 6e83abf

4 files changed

Lines changed: 21 additions & 14 deletions

File tree

backends/qualcomm/quantizer/quantizer.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,16 @@
99
from typing import Callable, Dict, List, Optional, Sequence, Set, Tuple
1010

1111
# To support quantize op lowering in AOT
12-
import executorch.extension.pybindings.portable_lib # noqa[F401]
13-
import executorch.kernels.quantized # noqa[F401]
14-
12+
try:
13+
import executorch.extension.pybindings.portable_lib # noqa[F401]
14+
import executorch.kernels.quantized # noqa[F401]
15+
except:
16+
import logging
17+
18+
logging.info(
19+
"Failed to load portable_lib and quantized_aot_lib. To run on LPAI backend, please build ExecuTorch with portable_lib"
20+
)
21+
del logging
1522
import torch
1623
from executorch.backends.qualcomm._passes.qnn_pass_manager import QnnPassManager
1724

backends/qualcomm/runtime/QnnExecuTorch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define QNN_RUNTIME_PROFILE_LEVEL "qnn_runtime_profile_level"
2323
#define QNN_RUNTIME_LPAI_FPS "qnn_runtime_lpai_fps"
2424
#define QNN_RUNTIME_LPAI_FTRT_RATIO "qnn_runtime_lpai_ftrt_ratio"
25-
#define QNN_RUNTIME_LPAI_CLIENT_PERF_TYPE "qnn_runtime_lpai_clent_perf_type"
25+
#define QNN_RUNTIME_LPAI_CLIENT_PERF_TYPE "qnn_runtime_lpai_client_perf_type"
2626
#define QNN_RUNTIME_LPAI_AFFINITY "qnn_runtime_lpai_affinity"
2727
#define QNN_RUNTIME_LPAI_CORE_SELECTION "qnn_runtime_lpai_core_selection"
2828

backends/qualcomm/runtime/QnnExecuTorchBackend.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,13 @@ executorch::runtime::Error QnnExecuTorchBackend::set_option(
223223
}
224224
} else if (strcmp(option.key, QNN_RUNTIME_LPAI_FPS) == 0) {
225225
if (auto* val = std::get_if<int>(&option.value)) {
226-
qnn_runtime_lapi_fps_.value = *val;
227-
qnn_runtime_lapi_fps_.is_set = true;
226+
qnn_runtime_lpai_fps_.value = *val;
227+
qnn_runtime_lpai_fps_.is_set = true;
228228
}
229229
} else if (strcmp(option.key, QNN_RUNTIME_LPAI_FTRT_RATIO) == 0) {
230230
if (auto* val = std::get_if<int>(&option.value)) {
231-
qnn_runtime_lapi_ftrt_ratio_.value = *val;
232-
qnn_runtime_lapi_ftrt_ratio_.is_set = true;
231+
qnn_runtime_lpai_ftrt_ratio_.value = *val;
232+
qnn_runtime_lpai_ftrt_ratio_.is_set = true;
233233
}
234234
} else if (strcmp(option.key, QNN_RUNTIME_LPAI_CLIENT_PERF_TYPE) == 0) {
235235
if (auto* val = std::get_if<int>(&option.value)) {
@@ -285,12 +285,12 @@ executorch::runtime::Error QnnExecuTorchBackend::get_option(
285285
backend_options[i].value = qnn_runtime_profile_level_.value;
286286
} else if (
287287
strcmp(backend_options[i].key, QNN_RUNTIME_LPAI_FPS) == 0 &&
288-
qnn_runtime_lapi_fps_.is_set) {
289-
backend_options[i].value = qnn_runtime_lapi_fps_.value;
288+
qnn_runtime_lpai_fps_.is_set) {
289+
backend_options[i].value = qnn_runtime_lpai_fps_.value;
290290
} else if (
291291
strcmp(backend_options[i].key, QNN_RUNTIME_LPAI_FTRT_RATIO) == 0 &&
292-
qnn_runtime_lapi_ftrt_ratio_.is_set) {
293-
backend_options[i].value = qnn_runtime_lapi_ftrt_ratio_.value;
292+
qnn_runtime_lpai_ftrt_ratio_.is_set) {
293+
backend_options[i].value = qnn_runtime_lpai_ftrt_ratio_.value;
294294
} else if (
295295
strcmp(backend_options[i].key, QNN_RUNTIME_LPAI_CLIENT_PERF_TYPE) ==
296296
0 &&

backends/qualcomm/runtime/QnnExecuTorchBackend.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ class QnnExecuTorchBackend final
6666
RuntimeOption qnn_runtime_log_level_{false, 0};
6767
RuntimeOption qnn_runtime_performance_mode_{false, 0};
6868
RuntimeOption qnn_runtime_profile_level_{false, 0};
69-
RuntimeOption qnn_runtime_lapi_fps_{false, 0};
70-
RuntimeOption qnn_runtime_lapi_ftrt_ratio_{false, 0};
69+
RuntimeOption qnn_runtime_lpai_fps_{false, 0};
70+
RuntimeOption qnn_runtime_lpai_ftrt_ratio_{false, 0};
7171
RuntimeOption qnn_runtime_lpai_client_perf_type_{false, 0};
7272
RuntimeOption qnn_runtime_lpai_affinity_{false, 0};
7373
RuntimeOption qnn_runtime_lpai_core_selection_{false, 0};

0 commit comments

Comments
 (0)