@@ -823,11 +823,26 @@ jobs:
823
823
echo "Recipe: $RECIPE"
824
824
echo "Quantize: $QUANTIZE"
825
825
826
- echo "::group::Set up ExecuTorch"
827
826
# The generic Linux job chooses to use base env, not the one setup by the image
828
827
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
829
828
conda activate "${CONDA_ENV}"
830
- PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
829
+
830
+ echo "::group::Setup ExecuTorch"
831
+ PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "cmake"
832
+ echo "::endgroup::"
833
+
834
+ echo "::group::Setup Huggingface"
835
+ pip install -U "huggingface_hub[cli]" accelerate
836
+ huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
837
+ OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
838
+ pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
839
+ echo "::endgroup::"
840
+
841
+ echo "::group::Test MODEL: $MODEL RECIPE: $RECIPE QUANTIZE: $QUANTIZE"
842
+ export OUTPUT_DIR="$(pwd)/${MODEL}_${RECIPE}_${QUANTIZE}"
843
+ python .ci/scripts/test_huggingface_optimum_model.py --model "$MODEL" --recipe "$RECIPE" $QUANTIZE --model_dir "$OUTPUT_DIR"
844
+ echo "::endgroup::"
845
+
831
846
# Build executor_runner with ETdump enabled
832
847
PYTHON_EXECUTABLE=python cmake -DPYTHON_EXECUTABLE=python \
833
848
-DCMAKE_INSTALL_PREFIX=cmake-out \
@@ -836,6 +851,7 @@ jobs:
836
851
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
837
852
-DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
838
853
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
854
+ -DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
839
855
-DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
840
856
-DEXECUTORCH_BUILD_XNNPACK=ON \
841
857
-DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
@@ -845,25 +861,6 @@ jobs:
845
861
-DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
846
862
-Bcmake-out .
847
863
cmake --build cmake-out -j16 --target install --config Release
848
- echo "::endgroup::"
849
-
850
- echo "::group::Set up Hugging Face"
851
- pip install -U "huggingface_hub[cli]"
852
- huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
853
- OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
854
- git clone https://github.com/huggingface/optimum-executorch
855
- pushd optimum-executorch
856
- # There is no release yet, for CI stability, always test from the same commit on main
857
- git checkout $OPTIMUM_ET_COMMIT
858
- python install_dev.py --skip_override_torch
859
- popd
860
- pip list
861
- echo "::endgroup::"
862
-
863
- echo "::group::Run tests"
864
- export OUTPUT_DIR="$(pwd)/${MODEL}_${RECIPE}_${QUANTIZE}"
865
- python .ci/scripts/test_huggingface_optimum_model.py --model ${MODEL} --recipe ${RECIPE} ${QUANTIZE} --model_dir ${OUTPUT_DIR}
866
- echo "::endgroup::"
867
864
868
865
echo "::group::Generate artifacts for performance profiling"
869
866
./cmake-out/executor_runner \
@@ -930,16 +927,11 @@ jobs:
930
927
${CONDA_RUN} python install_executorch.py
931
928
echo "::endgroup::"
932
929
933
- echo "::group::Set up Hugging Face"
934
- pip install -U "huggingface_hub[cli]"
935
- huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
936
- OPTIMUM_ET_COMMIT=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
937
- git clone https://github.com/huggingface/optimum-executorch
938
- pushd optimum-executorch
939
- # There is no release yet, for CI stability, always test from the same commit on main
940
- git checkout $OPTIMUM_ET_COMMIT
941
- ${CONDA_RUN} python install_dev.py --skip_override_torch
942
- popd
930
+ echo "::group::Set up Huggingface"
931
+ ${CONDA_RUN} pip install -U "huggingface_hub[cli]" accelerate
932
+ ${CONDA_RUN} huggingface-cli login --token $SECRET_EXECUTORCH_HF_TOKEN
933
+ OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
934
+ ${CONDA_RUN} pip install git+https://github.com/huggingface/optimum-executorch.git@${OPTIMUM_ET_VERSION}
943
935
${CONDA_RUN} pip list
944
936
echo "::endgroup::"
945
937
0 commit comments