Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion backends/qualcomm/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,33 @@ def validate_intermediate_tensor():
# ok, assuming the user give a relative path to cwd
build_folder = os.path.join(os.getcwd(), self.build_folder)

env_runner = os.environ.get("QNN_EXECUTOR_RUNNER")
runner_from_env = bool(env_runner and env_runner.strip())
if runner_from_env:
qnn_executor_runner = env_runner
else:
qnn_executor_runner = os.path.join(
build_folder,
"examples/qualcomm/executor_runner/qnn_executor_runner",
)
Comment on lines +439 to +447
if not os.path.isfile(qnn_executor_runner):
if runner_from_env:
raise FileNotFoundError(
f"QNN_EXECUTOR_RUNNER is set to {qnn_executor_runner!r} "
"but no executable file exists at that path. Update the "
"environment variable to point at the built "
"qnn_executor_runner binary."
)
Comment on lines +448 to +455
raise FileNotFoundError(
f"qnn_executor_runner not found at {qnn_executor_runner!r}. "
"Set the QNN_EXECUTOR_RUNNER environment variable to the "
"built binary, or build it via CMake so it appears at "
f"{build_folder}/examples/qualcomm/executor_runner/qnn_executor_runner."
)

cmd = [
# qnn_executor_runner
f"{build_folder}/examples/qualcomm/executor_runner/qnn_executor_runner",
qnn_executor_runner,
"--model_path",
pte_fname,
"--input_list_path",
Expand Down
Loading