@@ -684,10 +684,16 @@ endif()
684684
685685if (EXECUTORCH_BUILD_KERNELS_TORCHAO)
686686 if (NOT TARGET cpuinfo)
687- message (FATAL_ERROR "EXECUTORCH_BUILD_KERNELS_TORCHAO requires EXECUTORCH_BUILD_CPUINFO be set ON" )
687+ message (
688+ FATAL_ERROR
689+ "EXECUTORCH_BUILD_KERNELS_TORCHAO requires EXECUTORCH_BUILD_CPUINFO be set ON"
690+ )
688691 endif ()
689692 if (NOT TARGET pthreadpool)
690- message (FATAL_ERROR "EXECUTORCH_BUILD_KERNELS_TORCHAO requires EXECUTORCH_BUILD_PTHREADPOOL be set ON" )
693+ message (
694+ FATAL_ERROR
695+ "EXECUTORCH_BUILD_KERNELS_TORCHAO requires EXECUTORCH_BUILD_PTHREADPOOL be set ON"
696+ )
691697 endif ()
692698
693699 # Configure TorchAO kernels
@@ -702,10 +708,12 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
702708 message (FATAL_ERROR "EXECUTORCH_INCLUDE_DIRS is already defined" )
703709 endif ()
704710 set (EXECUTORCH_INCLUDE_DIRS
705- ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/pthreadpool/include
706- ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/cpuinfo/include
711+ ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/pthreadpool/include
712+ ${EXECUTORCH_ROOT} /backends/xnnpack/third-party/cpuinfo/include
713+ )
714+ add_subdirectory (
715+ ${CMAKE_CURRENT_SOURCE_DIR} /third-party/ao/torchao/experimental
707716 )
708- add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /third-party/ao/torchao/experimental)
709717 unset (EXECUTORCH_INCLUDE_DIRS)
710718
711719 executorch_target_link_options_shared_lib(torchao_ops_executorch)
@@ -719,7 +727,9 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
719727 DESTINATION ${_common_include_directories}
720728 )
721729 # If using KleidiAI and XNNPACK has not installed it already, install it
722- if (TORCHAO_BUILD_KLEIDIAI AND NOT (EXECUTORCH_BUILD_XNNPACK AND EXECUTORCH_XNNPACK_ENABLE_KLEIDI))
730+ if (TORCHAO_BUILD_KLEIDIAI AND NOT (EXECUTORCH_BUILD_XNNPACK
731+ AND EXECUTORCH_XNNPACK_ENABLE_KLEIDI)
732+ )
723733 install (
724734 TARGETS kleidiai
725735 EXPORT ExecuTorchTargets
0 commit comments