Skip to content
Closed
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .ci/scripts/gather_benchmark_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
],
"android": [
"qnn_q8",
# TODO: Add support for llama3 htp
# "llama3_qnn_htp",
"llama3_qnn_htp",
],
"ios": [
"coreml_fp16",
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/android-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ jobs:
matrix: ${{ fromJson(needs.set-parameters.outputs.benchmark_configs) }}
fail-fast: false
with:
runner: linux.2xlarge.memory
runner: linux.4xlarge.memory
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally on devserver, quantization is taking "INFO:root:Time for quantizing: 1203.9422521591187", but on CI it's 4x slower, bump up to use the 4x runner.

docker-image: executorch-ubuntu-22.04-qnn-sdk
submodules: 'true'
timeout: 60
timeout: 240
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Set to 120 still timed out.

upload-artifact: android-models
upload-artifact-to-s3: true
secrets-env: EXECUTORCH_HF_TOKEN
Expand Down Expand Up @@ -238,12 +238,17 @@ jobs:
--output_name="${OUT_ET_MODEL_NAME}.pte"
ls -lh "${OUT_ET_MODEL_NAME}.pte"
elif [[ ${{ matrix.config }} == "llama3_qnn_htp" ]]; then
DOWNLOADED_PATH=$(bash .ci/scripts/download_hf_hub.sh --model_id "${HF_MODEL_REPO}" --subdir "original" --files "tokenizer.model" "params.json" "consolidated.00.pth")
export QNN_SDK_ROOT=/tmp/qnn/2.25.0.240728
echo "QNN_SDK_ROOT=${QNN_SDK_ROOT}"
export LD_LIBRARY_PATH=$QNN_SDK_ROOT/lib/x86_64-linux-clang/
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}"
export PYTHONPATH=$(pwd)/..
echo "PYTHONPATH=${PYTHONPATH}"
python -c "import sys; sys.stdout.flush()"
sync # Ensures any buffered disk writes are committed

DOWNLOADED_PATH=$(bash .ci/scripts/download_hf_hub.sh --model_id "${HF_MODEL_REPO}" --subdir "original" --files "tokenizer.model" "params.json" "consolidated.00.pth")
python -m examples.qualcomm.oss_scripts.llama3_2.llama -- \
python -m examples.qualcomm.oss_scripts.llama3_2.llama \
--checkpoint "${DOWNLOADED_PATH}/consolidated.00.pth" \
--params "${DOWNLOADED_PATH}/params.json" \
--tokenizer_model "${DOWNLOADED_PATH}/tokenizer.model" \
Expand All @@ -252,10 +257,10 @@ jobs:
-m SM8650 \
--model_size 1B \
--model_mode kv \
-b "cmake-out" \
--prompt "Once"

OUT_ET_MODEL_NAME="llama3_2_qnn" # Qualcomm hard-coded it in their script
find . -name "${OUT_ET_MODEL_NAME}.pte" -not -path "./${OUT_ET_MODEL_NAME}.pte" -exec mv {} ./ \;
ls -lh "${OUT_ET_MODEL_NAME}.pte"
else
# By default, test with the Hugging Face model and the xnnpack recipe
Expand Down
Loading