File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -717,6 +717,27 @@ if(EXECUTORCH_BUILD_EXECUTOR_RUNNER)
717717 target_compile_options (executor_runner PUBLIC ${_common_compile_options} )
718718endif ()
719719
720+ if (EXECUTORCH_BUILD_TORCHAO)
721+ # Currently only enable this on Arm-based Macs
722+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" )
723+ set (TORCHAO_BUILD_EXECUTORCH_OPS ON )
724+ set (TORCHAO_BUILD_CPU_AARCH64 ON )
725+ add_subdirectory (
726+ ${CMAKE_CURRENT_SOURCE_DIR} /third-party/ao/torchao/experimental
727+ ${CMAKE_CURRENT_BINARY_DIR} /third-party/ao/torchao/experimental
728+ )
729+ target_link_options_shared_lib(torchao_ops_executorch)
730+ list (APPEND link_libraries torchao_ops_executorch)
731+ if (EXECUTORCH_BUILD_MPS)
732+ add_subdirectory (
733+ ${CMAKE_CURRENT_SOURCE_DIR} /third-party/ao/torchao/experimental/ops/mps
734+ ${CMAKE_CURRENT_BINARY_DIR} /third-party/ao/torchao/experimental/ops/mps)
735+ target_link_options_shared_lib(torchao_ops_mps_executorch)
736+ list (APPEND link_libraries torchao_ops_mps_executorch)
737+ endif ()
738+ endif ()
739+ endif ()
740+
720741if (EXECUTORCH_BUILD_VULKAN)
721742 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/vulkan)
722743endif ()
You can’t perform that action at this time.
0 commit comments