File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -839,7 +839,7 @@ endif()
839839if (EXECUTORCH_BUILD_TORCHAO)
840840  add_compile_options ("-frtti" )
841841  set (EXECUTORCH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /..)
842-   set (EXECUTORCH_LIBRARIES executorch extension_threadpool cpuinfo pthreadpool)
842+   set (EXECUTORCH_LIBRARIES executorch extension_threadpool)  #  cpuinfo pthreadpool)
843843  set (TORCHAO_BUILD_EXECUTORCH_OPS ON )
844844  add_subdirectory (third-party/ao/torchao/experimental)
845845endif ()
Original file line number Diff line number Diff line change @@ -122,8 +122,12 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
122122endif ()
123123
124124if (EXECUTORCH_BUILD_TORCHAO)
125-   list (APPEND  link_libraries  "$<LINK_LIBRARY:WHOLE_ARCHIVE,${CMAKE_CURRENT_BINARY_DIR} /../../../lib/libtorchao_ops_executorch.a>" )
126-   list (APPEND  link_libraries  "${CMAKE_CURRENT_BINARY_DIR} /../../../lib/libtorchao_kernels_aarch64.a" )
125+   set (torchao_DIR ${CMAKE_CURRENT_BINARY_DIR} /../../../lib/cmake/torchao)
126+   find_package (torchao REQUIRED)
127+   target_link_options_shared_lib(torchao::torchao_ops_executorch)
128+   list (APPEND  link_libraries  torchao::torchao_ops_executorch)
129+   # list(APPEND link_libraries "$<LINK_LIBRARY:WHOLE_ARCHIVE,${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_ops_executorch.a>") 
130+   # list(APPEND link_libraries "${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_kernels_aarch64.a") 
127131endif ()
128132
129133set (XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR} /../../../backends/xnnpack)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments