Skip to content

Commit cd9d730

Browse files
committed
add quantize ops to pybindings
1 parent 8dc54d5 commit cd9d730

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
@@ -376,6 +376,7 @@ def run(self):
376376
if ShouldBuild.pybindings:
377377
cmake_args += [
378378
"-DEXECUTORCH_BUILD_PYBIND=ON",
379+
"-DEXECUTORCH_BUILD_QUANTIZED=ON", # add quantized ops to pybindings.
379380
]
380381
build_args += ["--target", "portable_lib"]
381382
if ShouldBuild.xnnpack:

0 commit comments

Comments
 (0)