File tree Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Expand file tree Collapse file tree 2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -386,10 +386,7 @@ buck_targets = [
386386  " //extension/llm/custom_ops:custom_ops"  ,
387387]
388388filters  = [
389-   #  Second clause is to pick up fht_neon.c/fht_avx.c from FFHT. TODO:
390-   #  remove filters and patch extract_sources.py's Buck query to fetch
391-   #  srcs; presumably filters is here to remove .h files.
392-   " (.cpp$)|(fht.*\\ .c$)"  ,
389+   " .cpp$"  ,
393390]
394391excludes  = [
395392  " ^codegen"  ,
Original file line number Diff line number Diff line change @@ -45,6 +45,22 @@ list(APPEND custom_ops_libs cpuinfo)
4545list (APPEND  custom_ops_libs cpublas)
4646list (APPEND  custom_ops_libs eigen_blas)
4747
48+ if (CMAKE_SYSTEM_PROCESSOR  MATCHES  "^(aarch64|arm64|armv7)$" )
49+   list (APPEND  _custom_ops__srcs
50+        "extension/llm/custom_ops/spinquant/third-party/FFHT/fht_neon.c" 
51+   )
52+ elseif (CMAKE_SYSTEM_PROCESSOR  STREQUAL  "x86_64" )
53+   list (APPEND  _custom_ops__srcs
54+        "extension/llm/custom_ops/spinquant/third-party/FFHT/fht_avx.c" 
55+   )
56+ else ()
57+   message (
58+     FATAL_ERROR
59+       "Unsupported CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} . (If \  
60+ 32-bit x86, try using fht_avx.c and send a PR if it works!)" 
61+   )
62+ endif ()
63+ 
4864list (TRANSFORM _custom_ops__srcs PREPEND "${EXECUTORCH_ROOT} /" )
4965
5066if (NOT  EXECUTORCH_BUILD_XNNPACK)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments