File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -812,13 +812,11 @@ if(EXECUTORCH_BUILD_PYBIND)
812812 # pybind training
813813 pybind11_add_module(_training_lib SHARED extension/training/pybindings/_training_lib.cpp)
814814
815- target_compile_definitions (
816- _training_lib PUBLIC EXECUTORCH_PYTHON_MODULE_NAME=_training_lib
817- )
818815 target_include_directories (_training_lib PRIVATE ${TORCH_INCLUDE_DIRS} )
819816 target_compile_options (_training_lib PUBLIC ${_pybind_compile_options} )
820817 target_link_libraries (_training_lib PRIVATE ${_pybind_training_dep_libs} )
821818
819+ message (STATUS "Installing Training Lib" )
822820 install (TARGETS _training_lib
823821 LIBRARY DESTINATION executorch/extension/training/pybindings
824822 )
Original file line number Diff line number Diff line change @@ -80,9 +80,10 @@ def main(args):
8080 )
8181 if pybind_arg == "training" :
8282 CMAKE_ARGS += " -DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON"
83+ os .environ ["EXECUTORCH_BUILD_TRAINING" ] = "ON"
8384 else :
84- EXECUTORCH_BUILD_PYBIND = "ON"
8585 CMAKE_ARGS += f" -DEXECUTORCH_BUILD_{ pybind_arg .upper ()} =ON"
86+ EXECUTORCH_BUILD_PYBIND = "ON"
8687
8788 if args .clean :
8889 clean ()
Original file line number Diff line number Diff line change 5151import platform
5252import re
5353import sys
54+ import logging
5455
5556# Import this before distutils so that setuptools can intercept the distuils
5657# imports.
@@ -88,7 +89,7 @@ def pybindings(cls) -> bool:
8889
8990 @classmethod
9091 def training (cls ) -> bool :
91- return cls ._is_env_enabled ("EXECUTORCH_BUILD_TRAINING" , default = True )
92+ return cls ._is_env_enabled ("EXECUTORCH_BUILD_TRAINING" , default = False )
9293
9394 @classmethod
9495 def llama_custom_ops (cls ) -> bool :
@@ -580,6 +581,7 @@ def run(self):
580581 "-DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON" ,
581582 ]
582583 if ShouldBuild .training ():
584+ logging .info ("Building training foobar" )
583585 cmake_args += [
584586 "-DEXECUTORCH_BUILD_EXTENSION_TRAINING=ON" ,
585587 ]
@@ -686,7 +688,6 @@ def get_ext_modules() -> List[Extension]:
686688 )
687689 )
688690 if ShouldBuild .training ():
689-
690691 ext_modules .append (
691692 # Install the prebuilt pybindings extension wrapper for training
692693 BuiltExtension (
You can’t perform that action at this time.
0 commit comments