File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,11 @@ def use_debug_mode():
6969
7070import torch
7171from torch .utils .cpp_extension import (
72+ CUDA_HOME ,
73+ IS_WINDOWS ,
7274 BuildExtension ,
7375 CppExtension ,
74- CUDA_HOME ,
7576 CUDAExtension ,
76- IS_WINDOWS ,
7777)
7878
7979
Original file line number Diff line number Diff line change @@ -37,18 +37,15 @@ if(TORCHAO_BUILD_CPU_AARCH64)
3737 message (STATUS "Building with cpu/aarch64" )
3838 add_compile_definitions (TORCHAO_BUILD_CPU_AARCH64)
3939
40+ # Defines torchao_kernels_aarch64
41+ add_subdirectory (kernels/cpu/aarch64)
42+
4043 if (TORCHAO_BUILD_KLEIDIAI)
4144 message (STATUS "Building with Arm KleidiAI library" )
42- add_compile_definitions (TORCHAO_ENABLE_KLEIDI=1 )
45+ add_compile_definitions (TORCHAO_ENABLE_KLEIDI)
4346 endif ()
4447endif ()
4548
46-
47- if (TORCHAO_BUILD_CPU_AARCH64)
48- # Defines torchao_kernels_aarch64
49- add_subdirectory (kernels/cpu/aarch64)
50- endif ()
51-
5249add_subdirectory (ops/linear_8bit_act_xbit_weight)
5350add_subdirectory (ops/embedding_xbit)
5451
@@ -78,7 +75,6 @@ if(TORCHAO_BUILD_EXECUTORCH_OPS)
7875 install (
7976 TARGETS
8077 torchao_ops_executorch
81- # torchao_kernels_aarch64
8278 torchao_ops_linear_8bit_act_xbit_weight_executorch
8379 torchao_ops_embedding_xbit_executorch
8480 EXPORT _targets
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ if (TORCHAO_BUILD_CPU_AARCH64)
2222 GIT_TAG v1.2.0)
2323 FetchContent_MakeAvailable(kleidiai)
2424
25- # Temporarily exposing this to the parent scope until we wire
26- # this up properly from the top level
27- set (TORCHAO_BUILD_KLEIDI ON PARENT_SCOPE)
2825 target_link_libraries (torchao_kernels_aarch64 PUBLIC kleidiai)
2926 endif ()
3027
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ endif()
4040
4141add_subdirectory (${TORCHAO_LIBRARIES} /torchao/experimental/kernels/cpu/aarch64 ${CMAKE_CURRENT_BINARY_DIR} /torchao_kernels_aarch64)
4242
43- # The TORCHAO_BUILD_KLEIDI cmake variable should be set by `torchao_kernels_aarch64"
44- if (TORCHAO_BUILD_KLEIDI)
43+ if (TORCHAO_BUILD_KLEIDIAI)
4544 add_compile_definitions (TORCHAO_ENABLE_KLEIDI)
4645endif ()
4746
You can’t perform that action at this time.
0 commit comments