Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/scripts/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ install_executorch() {
which pip
# Install executorch, this assumes that Executorch is checked out in the
# current directory.
./install_executorch.sh --pybind xnnpack "$@"
./install_executorch.sh "$@"
# Just print out the list of packages for debugging
pip list
}
Expand Down
12 changes: 4 additions & 8 deletions install_executorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,10 @@ def main(args):
use_pytorch_nightly = True

wants_pybindings_off, pybind_defines = _list_pybind_defines(args)
if not wants_pybindings_off:
if len(pybind_defines) > 0:
# If the user explicitly provides a list of bindings, just use them
cmake_args += pybind_defines
else:
# If the user has not set pybindings off but also has not provided
# a list, then turn on xnnpack by default
cmake_args.append("-DEXECUTORCH_BUILD_XNNPACK=ON")
if wants_pybindings_off:
cmake_args.append("-DEXECUTORCH_BUILD_PYBIND=OFF")
else:
cmake_args += pybind_defines

if args.clean:
clean()
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def openvino(cls) -> bool:

@classmethod
def xnnpack(cls) -> bool:
return cls._is_cmake_arg_enabled("EXECUTORCH_BUILD_XNNPACK", default=False)
return cls._is_cmake_arg_enabled("EXECUTORCH_BUILD_XNNPACK", default=True)

@classmethod
def training(cls) -> bool:
Expand Down Expand Up @@ -730,6 +730,9 @@ def run(self):
"-DEXECUTORCH_BUILD_KERNELS_QUANTIZED_AOT=ON",
]

if ShouldBuild.xnnpack():
cmake_args += ["-DEXECUTORCH_BUILD_XNNPACK=ON"]

if ShouldBuild.training():
build_args += ["--target", "_training_lib"]

Expand Down
Loading