Skip to content

Commit e058cf5

Browse files
committed
up
1 parent 0d33ec9 commit e058cf5

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def use_debug_mode():
6969

7070
import torch
7171
from 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

torchao/experimental/CMakeLists.txt

+4-8
Original file line numberDiff line numberDiff 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()
4447
endif()
4548

46-
47-
if (TORCHAO_BUILD_CPU_AARCH64)
48-
# Defines torchao_kernels_aarch64
49-
add_subdirectory(kernels/cpu/aarch64)
50-
endif()
51-
5249
add_subdirectory(ops/linear_8bit_act_xbit_weight)
5350
add_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

torchao/experimental/kernels/cpu/aarch64/CMakeLists.txt

-3
Original file line numberDiff line numberDiff 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

torchao/experimental/kernels/cpu/aarch64/tests/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ endif()
4040

4141
add_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)
4645
endif()
4746

0 commit comments

Comments
 (0)