From 4a44e0976db3fdf0259339cdb1aef5cf0ce330f1 Mon Sep 17 00:00:00 2001 From: Chen Lai Date: Sun, 5 Jan 2025 21:39:33 -0800 Subject: [PATCH] fix the qnn sdk env issue Summary: `executorch/examples/qualcomm/utils.py` will check if `QNN_SDK_ROOT` is set. This is helpful for oss, but internally we rely on buck to set the deps. Currently we just set `QNN_SDK_ROOT` to empty to bypass the issue. ``` buck run mode/dev-nosan //executorch/examples/qualcomm/oss_scripts/llama3_2:llama_qnn -- --compile_only --ptq 16a4w --checkpoint /home/chenlai/local//consolidated.00.pth --params /home/chenlai/local//params.json --tokenizer_model /home/chenlai/local//tokenizer.model --prompt "Once" -m SM8650 --model_size 1B --model_mode hybrid --build_folder /home/chenlai/local 2>&1 | tee static_llama.log ``` bypass-github-export-checks Reviewed By: billmguo Differential Revision: D67814838 --- examples/qualcomm/oss_scripts/llama3_2/TARGETS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/qualcomm/oss_scripts/llama3_2/TARGETS b/examples/qualcomm/oss_scripts/llama3_2/TARGETS index 42efd4d90b4..cab2076f8d6 100644 --- a/examples/qualcomm/oss_scripts/llama3_2/TARGETS +++ b/examples/qualcomm/oss_scripts/llama3_2/TARGETS @@ -30,6 +30,8 @@ runtime.command_alias( name = "llama_qnn", env = { "LD_LIBRARY_PATH": "$(location fbsource//third-party/qualcomm/qnn/qnn-{0}:qnn_offline_compile_libs)".format(get_qnn_library_verision()), + # Place holder to pass the QNN_SDK_ROOT check in executorch/examples/qualcomm/utils.py + "QNN_SDK_ROOT": "", }, exe = ":llama", )