@@ -50,12 +50,10 @@ prepare_artifacts_upload() {
5050
5151build_cmake_executor_runner () {
5252 echo " Building executor_runner"
53- CMAKE_PREFIX_PATH=" $( python3 -c ' import torch as _; print(_.__path__[0])' ) "
5453 rm -rf ${CMAKE_OUTPUT_DIR}
5554 cmake -DCMAKE_BUILD_TYPE=Debug \
5655 -DEXECUTORCH_BUILD_KERNELS_OPTIMIZED=ON \
5756 -DPYTHON_EXECUTABLE=" $PYTHON_EXECUTABLE " \
58- -DCMAKE_PREFIX_PATH=" $CMAKE_PREFIX_PATH " \
5957 -B${CMAKE_OUTPUT_DIR} .
6058
6159 cmake --build ${CMAKE_OUTPUT_DIR} -j4 --config Debug
@@ -93,21 +91,29 @@ test_model() {
9391 # Install requirements for llama vision.
9492 bash examples/models/llama3_2_vision/install_requirements.sh
9593 fi
96- # python3 -m examples.portable.scripts.export --model_name="llama2" should works too
94+ if [[ " ${MODEL_NAME} " == " qwen2_5" ]]; then
95+ # Install requirements for export_llama
96+ bash examples/models/llama/install_requirements.sh
97+ # Test export_llama script: python3 -m examples.models.llama.export_llama.
98+ # Use Llama random checkpoint with Qwen 2.5 1.5b model configuration.
99+ " ${PYTHON_EXECUTABLE} " -m examples.models.llama.export_llama --model " ${MODEL_NAME} " -c examples/models/llama/params/demo_rand_params.pth -p examples/models/qwen2_5/1_5b_config.json
100+ rm " ./${MODEL_NAME} .pte"
101+ return # Skip running with portable executor runnner since portable doesn't support Qwen's biased linears.
102+ fi
103+
104+ # Export a basic .pte and run the model.
97105 " ${PYTHON_EXECUTABLE} " -m examples.portable.scripts.export --model_name=" ${MODEL_NAME} " " ${STRICT} "
98106 run_portable_executor_runner
99107}
100108
101109build_cmake_xnn_executor_runner () {
102110 echo " Building xnn_executor_runner"
103- CMAKE_PREFIX_PATH=" $( python3 -c ' import torch as _; print(_.__path__[0])' ) "
104111
105112 (rm -rf ${CMAKE_OUTPUT_DIR} \
106113 && mkdir ${CMAKE_OUTPUT_DIR} \
107114 && cd ${CMAKE_OUTPUT_DIR} \
108115 && retry cmake -DCMAKE_BUILD_TYPE=Release \
109116 -DEXECUTORCH_BUILD_XNNPACK=ON \
110- -DCMAKE_PREFIX_PATH=" $CMAKE_PREFIX_PATH " \
111117 -DPYTHON_EXECUTABLE=" $PYTHON_EXECUTABLE " ..)
112118
113119 cmake --build ${CMAKE_OUTPUT_DIR} -j4
0 commit comments