File tree 4 files changed +7
-15
lines changed
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():
69
69
70
70
import torch
71
71
from torch .utils .cpp_extension import (
72
+ CUDA_HOME ,
73
+ IS_WINDOWS ,
72
74
BuildExtension ,
73
75
CppExtension ,
74
- CUDA_HOME ,
75
76
CUDAExtension ,
76
- IS_WINDOWS ,
77
77
)
78
78
79
79
Original file line number Diff line number Diff line change @@ -37,18 +37,15 @@ if(TORCHAO_BUILD_CPU_AARCH64)
37
37
message (STATUS "Building with cpu/aarch64" )
38
38
add_compile_definitions (TORCHAO_BUILD_CPU_AARCH64)
39
39
40
+ # Defines torchao_kernels_aarch64
41
+ add_subdirectory (kernels/cpu/aarch64)
42
+
40
43
if (TORCHAO_BUILD_KLEIDIAI)
41
44
message (STATUS "Building with Arm KleidiAI library" )
42
- add_compile_definitions (TORCHAO_ENABLE_KLEIDI=1 )
45
+ add_compile_definitions (TORCHAO_ENABLE_KLEIDI)
43
46
endif ()
44
47
endif ()
45
48
46
-
47
- if (TORCHAO_BUILD_CPU_AARCH64)
48
- # Defines torchao_kernels_aarch64
49
- add_subdirectory (kernels/cpu/aarch64)
50
- endif ()
51
-
52
49
add_subdirectory (ops/linear_8bit_act_xbit_weight)
53
50
add_subdirectory (ops/embedding_xbit)
54
51
@@ -78,7 +75,6 @@ if(TORCHAO_BUILD_EXECUTORCH_OPS)
78
75
install (
79
76
TARGETS
80
77
torchao_ops_executorch
81
- # torchao_kernels_aarch64
82
78
torchao_ops_linear_8bit_act_xbit_weight_executorch
83
79
torchao_ops_embedding_xbit_executorch
84
80
EXPORT _targets
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ if (TORCHAO_BUILD_CPU_AARCH64)
22
22
GIT_TAG v1.2.0)
23
23
FetchContent_MakeAvailable(kleidiai)
24
24
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)
28
25
target_link_libraries (torchao_kernels_aarch64 PUBLIC kleidiai)
29
26
endif ()
30
27
Original file line number Diff line number Diff line change @@ -40,8 +40,7 @@ endif()
40
40
41
41
add_subdirectory (${TORCHAO_LIBRARIES} /torchao/experimental/kernels/cpu/aarch64 ${CMAKE_CURRENT_BINARY_DIR} /torchao_kernels_aarch64)
42
42
43
- # The TORCHAO_BUILD_KLEIDI cmake variable should be set by `torchao_kernels_aarch64"
44
- if (TORCHAO_BUILD_KLEIDI)
43
+ if (TORCHAO_BUILD_KLEIDIAI)
45
44
add_compile_definitions (TORCHAO_ENABLE_KLEIDI)
46
45
endif ()
47
46
You can’t perform that action at this time.
0 commit comments