From 84ea1c234c2ed50f7d0ea276f6fb9c987e7ff050 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 25 Nov 2024 09:16:39 -0800 Subject: [PATCH] fix pt2e --- .ci/scripts/test_llama.sh | 3 +++ .github/workflows/pull.yml | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.ci/scripts/test_llama.sh b/.ci/scripts/test_llama.sh index 23a579e67c4..e1098455470 100644 --- a/.ci/scripts/test_llama.sh +++ b/.ci/scripts/test_llama.sh @@ -48,6 +48,9 @@ MODE=${MODE:-"xnnpack+custom"} # Default UPLOAD_DIR to empty string if not set UPLOAD_DIR="${UPLOAD_DIR:-}" +# Default PT2E_QUANTIZE to empty string if not set +PT2E_QUANTIZE="${PT2E_QUANTIZE:-}" + if [[ $# -lt 4 ]]; then # Assuming 4 mandatory args echo "Expecting atleast 4 positional arguments" echo "Usage: [...]" diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 6fc8ca91852..88cd8ff15ad 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -368,6 +368,7 @@ jobs: strategy: matrix: dtype: [fp32] + pt2e_quantize: [qnn_16a16w, qnn_8a8w] mode: [qnn] fail-fast: false with: @@ -384,6 +385,7 @@ jobs: DTYPE=${{ matrix.dtype }} BUILD_TOOL="cmake" MODE=${{ matrix.mode }} + PT2E_QUANTIZE=${{ matrix.pt2e_quantize }} PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh @@ -393,7 +395,7 @@ jobs: # Install requirements for export_llama PYTHON_EXECUTABLE=python bash examples/models/llama/install_requirements.sh # Test llama2 - PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh -model stories110M -build_tool "${BUILD_TOOL}" -dtype "${DTYPE}" -mode "${MODE}" + PYTHON_EXECUTABLE=python bash .ci/scripts/test_llama.sh -model stories110M -build_tool "${BUILD_TOOL}" -mode "${MODE}" -dtype "${DTYPE}" -pt2e_quantize "${PT2E_QUANTIZE}" test-phi-3-mini-runner-linux: name: test-phi-3-mini-runner-linux