Skip to content

Commit 27201f1

Browse files
authored
Merge branch 'main' into thread-pool-size
2 parents a3eb0fe + f2eb38e commit 27201f1

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

backends/qualcomm/runtime/QnnBackendOptions.cpp

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,28 @@ T get_option(T aot_option) {
2121
executorch::runtime::BackendOption backend_option;
2222

2323
if constexpr (std::is_same_v<T, QnnExecuTorchLogLevel>) {
24-
backend_option = {QNN_RUNTIME_LOG_LEVEL, -1};
24+
std::strncpy(
25+
backend_option.key,
26+
QNN_RUNTIME_LOG_LEVEL,
27+
runtime::kMaxOptionKeyLength);
28+
backend_option.key[runtime::kMaxOptionKeyLength - 1] = '\0';
29+
backend_option.value = -1;
2530
} else if constexpr (std::is_same_v<T, QnnExecuTorchHtpPerformanceMode>) {
26-
backend_option = {QNN_RUNTIME_HTP_PERFORMANCE_MODE, -1};
31+
std::strncpy(
32+
backend_option.key,
33+
QNN_RUNTIME_HTP_PERFORMANCE_MODE,
34+
runtime::kMaxOptionKeyLength);
35+
backend_option.key[runtime::kMaxOptionKeyLength - 1] = '\0';
36+
backend_option.value = -1;
2737
} else if constexpr (std::is_same_v<T, QnnExecuTorchProfileLevel>) {
28-
backend_option = {QNN_RUNTIME_PROFILE_LEVEL, -1};
38+
std::strncpy(
39+
backend_option.key,
40+
QNN_RUNTIME_PROFILE_LEVEL,
41+
runtime::kMaxOptionKeyLength);
42+
backend_option.key[runtime::kMaxOptionKeyLength - 1] = '\0';
43+
backend_option.value = -1;
2944
}
45+
3046
// This will call get_option under runtime backend interface
3147
status = get_option(QNN_BACKEND, backend_option);
3248

setup.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,13 @@ def run(self):
478478
tmp_path = Path(tmpdir)
479479
sdk_path = _download_qnn_sdk(dst_folder=tmp_path)
480480

481-
logging.info("sdk_path: ", sdk_path)
482481
if not sdk_path:
483482
raise RuntimeError(
484483
"Qualcomm SDK not found, cannot build backend"
485484
)
486485

487486
# Determine paths
488487
prj_root = Path(__file__).parent.resolve()
489-
logging.info("prj_root: ", prj_root)
490488
build_sh = prj_root / "backends/qualcomm/scripts/build.sh"
491489
build_root = prj_root / "build-x86"
492490

0 commit comments

Comments
 (0)