File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ set_up_aot() {
4040 -DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
4141 -DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
4242 -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
43+ -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
44+ -DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON \
4345 -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
4446 -DPYTHON_EXECUTABLE=python3
4547 cmake --build $PWD --target " PyQnnManagerAdaptor" -j$( nproc)
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ def define_common_targets():
2626 "-DEXECUTORCH_PYTHON_MODULE_NAME={}" .format (PYTHON_MODULE_NAME ),
2727 ],
2828 deps = [
29+ "//executorch/kernels/quantized:aot_lib" ,
30+ "//executorch/kernels/quantized:quantized_ops_lib" ,
2931 "//executorch/runtime/core:core" ,
3032 "//executorch/backends/qualcomm/aot/python:python_lib" ,
3133 "//executorch/backends/qualcomm/aot/wrappers:wrappers" ,
Original file line number Diff line number Diff line change 1010
1111# To support quantize op lowering in AOT
1212try :
13- import executorch .extension .pybindings .portable_lib # noqa[F401]
1413 import executorch .kernels .quantized # noqa[F401]
1514except :
1615 import logging
1716
1817 logging .info (
19- "Failed to load portable_lib and quantized_aot_lib. To run on LPAI backend, please build ExecuTorch with portable_lib "
18+ "Failed to load quantized_aot_lib. To run on LPAI backend, please make sure that quantized_aot_lib is accessible. "
2019 )
2120 del logging
2221import torch
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ def define_common_targets():
1515 visibility = ["PUBLIC" ],
1616 deps = [
1717 "//executorch/backends/transforms:decompose_sdpa" ,
18- "//executorch/extension/pybindings:portable_lib " ,
18+ "//executorch/kernels/quantized:aot_lib " ,
1919 "//executorch/kernels/quantized:quantized_ops_lib" ,
20+
2021 ],
2122 )
Original file line number Diff line number Diff line change @@ -364,6 +364,7 @@ if [ "$BUILD_X86_64" = true ]; then
364364 -DEXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR=ON \
365365 -DEXECUTORCH_BUILD_EXTENSION_NAMED_DATA_MAP=ON \
366366 -DEXECUTORCH_BUILD_KERNELS_QUANTIZED=ON \
367+ -DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON \
367368 -DEXECUTORCH_BUILD_EXTENSION_TENSOR=ON \
368369 -DEXECUTORCH_ENABLE_EVENT_TRACER=ON \
369370 -DEXECUTORCH_ENABLE_LOGGING=ON \
@@ -375,6 +376,7 @@ if [ "$BUILD_X86_64" = true ]; then
375376
376377 rm -f $PRJ_ROOT /backends/qualcomm/python/*
377378 cp -fv $BUILD_ROOT /backends/qualcomm/Py* " $PRJ_ROOT /backends/qualcomm/python"
379+ cp -fv $BUILD_ROOT /kernels/quantized/libquantized_ops_aot_lib.so " $PRJ_ROOT /kernels/quantized"
378380 cp -fv " $PRJ_ROOT /schema/program.fbs" " $PRJ_ROOT /exir/_serialize/program.fbs"
379381 cp -fv " $PRJ_ROOT /schema/scalar_type.fbs" " $PRJ_ROOT /exir/_serialize/scalar_type.fbs"
380382
You can’t perform that action at this time.
0 commit comments