|
2 | 2 | # Copyright (c) Meta Platforms, Inc. and affiliates.
|
3 | 3 | # All rights reserved.
|
4 | 4 | #
|
5 |
| -# Copyright 2023-2024 Arm Limited and/or its affiliates. |
| 5 | +# Copyright 2023-2025 Arm Limited and/or its affiliates. |
6 | 6 | #
|
7 | 7 | # This source code is licensed under the BSD-style license found in the
|
8 | 8 | # LICENSE file in the root directory of this source tree.
|
@@ -256,40 +256,6 @@ function build_executorch() {
|
256 | 256 | find . -name "*.a" -exec ls -al {} \;
|
257 | 257 | }
|
258 | 258 |
|
259 |
| -# Build .so library to register quant ops with AoT flow |
260 |
| -function build_quantization_aot_lib() |
261 |
| -{ |
262 |
| - SITE_PACKAGES="$(python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')" |
263 |
| - CMAKE_PREFIX_PATH="${SITE_PACKAGES}/torch" |
264 |
| -
|
265 |
| - cd $et_root_dir |
266 |
| - mkdir -p cmake-out-aot-lib |
267 |
| -
|
268 |
| - echo "--------------------------------------------------------------------------------" |
269 |
| - echo "Build .so library to register quant ops with AoT flow ${build_type} into '${et_root_dir}' - 'cmake-out-aot-lib'" |
270 |
| - echo "--------------------------------------------------------------------------------" |
271 |
| -
|
272 |
| - build_with_etdump_flags="" |
273 |
| - if [ "$build_with_etdump" = true ] ; then |
274 |
| - build_with_etdump_flags="-DEXECUTORCH_BUILD_DEVTOOLS=ON \ |
275 |
| - -DEXECUTORCH_ENABLE_EVENT_TRACER=ON " |
276 |
| - fi |
277 |
| -
|
278 |
| - cmake \ |
279 |
| - -DCMAKE_PREFIX_PATH="$CMAKE_PREFIX_PATH" \ |
280 |
| - -DCMAKE_BUILD_TYPE=${build_type} \ |
281 |
| - -DEXECUTORCH_BUILD_XNNPACK=OFF \ |
282 |
| - -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \ |
283 |
| - -DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON \ |
284 |
| - ${build_with_etdump_flags} \ |
285 |
| - -DPYTHON_EXECUTABLE=$(which python3) \ |
286 |
| - ${extra_build_flags} \ |
287 |
| - -Bcmake-out-aot-lib \ |
288 |
| - "${et_root_dir}" |
289 |
| -
|
290 |
| - cmake --build cmake-out-aot-lib --parallel -- quantized_ops_aot_lib |
291 |
| -} |
292 |
| -
|
293 | 259 | # build Arm Baremetal executor_runner
|
294 | 260 | function build_executorch_runner() {
|
295 | 261 | echo "[${FUNCNAME[0]}] Generating ExecuTorch libraries"
|
@@ -397,7 +363,7 @@ hash arm-none-eabi-gcc \
|
397 | 363 |
|
398 | 364 | # build executorch libraries
|
399 | 365 | build_executorch
|
400 |
| -build_quantization_aot_lib |
| 366 | +cd $et_root_dir && backends/arm/scripts/build_quantized_ops_aot_lib.sh $build_type |
401 | 367 |
|
402 | 368 | if [[ -z "$model_name" ]]; then
|
403 | 369 | # the test models run, and whether to delegate
|
|
0 commit comments