Skip to content

Commit 7ceebe7

Browse files
committed
Build custom ops in pybinding
Right now we are not building it and it is causing missing ops in torchchat. This PR adds it into pybinding.
1 parent 329184a commit 7ceebe7

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ if(EXECUTORCH_BUILD_PYBIND)
559559
endif()
560560

561561
if(EXECUTORCH_BUILD_CUSTOM)
562+
target_link_options_shared_lib(custom_ops)
562563
list(APPEND _dep_libs custom_ops)
563564
endif()
564565

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@ def run(self):
389389

390390
if ShouldBuild.llama_custom_ops:
391391
cmake_args += [
392+
"-DEXECUTORCH_BUILD_CUSTOM=ON", # add llama sdpa ops to pybindings.
392393
"-DEXECUTORCH_BUILD_CUSTOM_OPS_AOT=ON",
393394
]
394395
build_args += ["--target", "custom_ops_aot_lib"]

0 commit comments

Comments
 (0)