Skip to content

Commit 4345e17

Browse files
committed
debug
1 parent 06af57d commit 4345e17

File tree

2 files changed

+32
-21
lines changed

2 files changed

+32
-21
lines changed

.github/workflows/trunk.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -827,32 +827,23 @@ jobs:
827827
# The generic Linux job chooses to use base env, not the one setup by the image
828828
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
829829
conda activate "${CONDA_ENV}"
830-
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
831-
# Build executor_runner with ETdump enabled
832-
PYTHON_EXECUTABLE=python cmake -DPYTHON_EXECUTABLE=python \
833-
-DCMAKE_INSTALL_PREFIX=cmake-out \
834-
-DEXECUTORCH_ENABLE_LOGGING=1 \
835-
-DCMAKE_BUILD_TYPE=Release \
836-
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
837-
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
838-
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
839-
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
840-
-DEXECUTORCH_BUILD_XNNPACK=ON \
841-
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
842-
-DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
843-
-DEXECUTORCH_BUILD_KERNELS_LLM=ON \
844-
-DEXECUTORCH_BUILD_DEVTOOLS=ON \
845-
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
846-
-Bcmake-out .
847-
cmake --build cmake-out -j16 --target install --config Release
830+
# Install executorch
831+
${CONDA_RUN} python install_executorch.py
832+
848833
echo "::endgroup::"
849834
850835
echo "::group::Set up Hugging Face"
851836
pip install -U "huggingface_hub[cli]"
852837
huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
853838
OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
839+
840+
echo "Cloning optimum-executorch..."
841+
854842
git clone https://github.com/huggingface/optimum-executorch
855843
pushd optimum-executorch
844+
845+
echo "Checking out commit: $OPTIMUM_ET_COMMIT"
846+
856847
# There is no release yet, for CI stability, always test from the same commit on main
857848
git checkout $OPTIMUM_ET_COMMIT
858849
python install_dev.py --skip_override_torch

setup.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,12 +464,23 @@ def run(self):
464464
return
465465

466466
try:
467+
import sys, traceback
468+
469+
logging.info(f"Attempting to import Qualcomm backend...")
470+
logging.debug(f"sys.path = {sys.path}")
471+
467472
# Following code is for building the Qualcomm backend.
473+
logging.info("Trying to import Qualcomm backend SDK helpers")
474+
logging.debug(f"sys.path = {sys.path}")
475+
logging.debug(f"Current working directory = {os.getcwd()}")
476+
468477
from backends.qualcomm.scripts.download_qnn_sdk import (
469478
_download_qnn_sdk,
470479
is_linux_x86,
471480
)
472481

482+
logging.info("Qualcomm backend imports succeeded")
483+
473484
if is_linux_x86():
474485
os.environ["EXECUTORCH_BUILDING_WHEEL"] = "1"
475486

@@ -493,6 +504,11 @@ def run(self):
493504
# Run build.sh with SDK path exported
494505
env = dict(**os.environ)
495506
env["QNN_SDK_ROOT"] = str(sdk_path)
507+
logging.info(
508+
f"Running build.sh: {build_sh} with QNN_SDK_ROOT={sdk_path}"
509+
)
510+
logging.info(f"Environment keys: {list(env.keys())}")
511+
496512
subprocess.check_call([str(build_sh), "--skip_aarch64"], env=env)
497513

498514
# Copy the main .so into the wheel package
@@ -530,9 +546,13 @@ def run(self):
530546
self.copy_file(str(so_src), str(so_dst))
531547
logging.info(f"Copied Qualcomm backend: {so_src} -> {so_dst}")
532548

533-
except ImportError:
534-
logging.error("Fail to build Qualcomm backend")
535-
logging.exception("Import error")
549+
except ImportError as e:
550+
logging.error("Fail to build Qualcomm backend: ImportError")
551+
logging.error("Message: %s", e)
552+
logging.error("sys.path at failure: %s", sys.path)
553+
logging.error("cwd at failure: %s", os.getcwd())
554+
traceback.print_exc()
555+
raise
536556

537557
if self.editable_mode:
538558
self._ran_build = True

0 commit comments

Comments
 (0)