Skip to content

Commit 913a755

Browse files
committed
add quantize ops to pybindings
1 parent 52b9a32 commit 913a755

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,11 @@ if(EXECUTORCH_BUILD_PYBIND)
562562
list(APPEND _dep_libs custom_ops)
563563
endif()
564564

565+
if(EXECUTORCH_BUILD_QUANTIZED)
566+
target_link_options_shared_lib(quantized_ops_lib)
567+
list(APPEND _dep_libs quantized_kernels quantized_ops_lib)
568+
endif()
569+
565570
# TODO(larryliu): Fix macOS 2 dylibs having 2 sets of static variables issue
566571
if(EXECUTORCH_BUILD_CUSTOM_OPS_AOT AND NOT APPLE)
567572
list(APPEND _dep_libs custom_ops_aot_lib)

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ def run(self):
375375
if ShouldBuild.pybindings:
376376
cmake_args += [
377377
"-DEXECUTORCH_BUILD_PYBIND=ON",
378+
"-DEXECUTORCH_BUILD_QUANTIZED=ON", # add quantized ops to pybindings.
378379
]
379380
build_args += ["--target", "portable_lib"]
380381
if ShouldBuild.xnnpack:

0 commit comments

Comments
 (0)