Skip to content

Commit ccc9f93

Browse files
committed
up
1 parent b610037 commit ccc9f93

File tree

2 files changed

+13
-75
lines changed

2 files changed

+13
-75
lines changed

torchao/csrc/cpu/CMakeLists.txt

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,19 @@ option(TORCHAO_BUILD_TESTS "Build tests" OFF)
2626
option(TORCHAO_BUILD_BENCHMARKS "Build tests" OFF)
2727

2828
# Set default compiler options
29-
add_compile_options("-fPIC" "-Wall" "-Werror" "-Wno-deprecated" "-Wno-shorten-64-to-32")
29+
add_compile_options("-fPIC" "-Wall" "-Werror" "-Wno-deprecated")
30+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
31+
add_compile_options(
32+
"-Wno-error=unknown-pragmas"
33+
"-Wno-array-parameter"
34+
"-Wno-maybe-uninitialized"
35+
"-Wno-sign-compare"
36+
)
37+
elseif (APPLE)
38+
add_compile_options("-Wno-shorten-64-to-32")
39+
endif()
40+
41+
3042

3143
if (NOT TARGET cpuinfo)
3244
cmake_policy(PUSH)
@@ -96,17 +108,6 @@ if(TORCHAO_BUILD_CPU_AARCH64)
96108
message(STATUS "Building with cpu/aarch64")
97109
add_compile_definitions(TORCHAO_BUILD_CPU_AARCH64)
98110

99-
# Set aarch64 compiler options
100-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
101-
message(STATUS "Add aarch64 linux compiler options")
102-
add_compile_options(
103-
"-Wno-error=unknown-pragmas"
104-
"-Wno-array-parameter"
105-
"-Wno-maybe-uninitialized"
106-
"-Wno-sign-compare"
107-
)
108-
endif()
109-
110111
if(TORCHAO_ENABLE_ARM_NEON_DOT)
111112
message(STATUS "Building with ARM NEON dot product support")
112113
add_compile_definitions(TORCHAO_ENABLE_ARM_NEON_DOT)

torchao/csrc/cpu/shared_kernels/benchmarks/CMakeLists.txt

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -24,66 +24,3 @@ set(TARGET_PREFIX "torchao_benchmarks_shared_kernels_")
2424
# benchmark::benchmark
2525
# torchao_kernels_aarch64
2626
# )
27-
28-
29-
30-
31-
32-
33-
# add_executable(${TARGET_PREFIX}benchmark_quantization benchmark_quantization.cpp)
34-
# target_link_libraries(
35-
# ${TARGET_PREFIX}benchmark_quantization
36-
# PRIVATE
37-
# benchmark::benchmark
38-
# ${TARGET_PREFIX}dep
39-
# )
40-
41-
# add_executable(${TARGET_PREFIX}benchmark_bitpacking benchmark_bitpacking.cpp)
42-
# target_link_libraries(
43-
# ${TARGET_PREFIX}benchmark_bitpacking
44-
# PRIVATE
45-
# benchmark::benchmark
46-
# ${TARGET_PREFIX}dep
47-
# )
48-
49-
50-
51-
52-
# cmake_minimum_required(VERSION 3.19)
53-
# project(benchmarks)
54-
55-
# set(CMAKE_CXX_STANDARD 17)
56-
# set(CMAKE_BUILD_TYPE Release)
57-
# add_compile_options("-Wall" "-Werror")
58-
59-
# set(TORCHAO_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
60-
# set(TORCHAO_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)
61-
62-
# include(FetchContent)
63-
# FetchContent_Declare(googlebenchmark
64-
# GIT_REPOSITORY https://github.com/google/benchmark.git
65-
# GIT_TAG main) # need main for benchmark::benchmark
66-
67-
# set(BENCHMARK_ENABLE_TESTING OFF)
68-
# FetchContent_MakeAvailable(
69-
# googlebenchmark)
70-
71-
# include_directories(${TORCHAO_INCLUDE_DIRS})
72-
73-
# set(TORCHAO_PARALLEL_BACKEND "openmp")
74-
75-
# include(${TORCHAO_ROOT}/Utils.cmake)
76-
77-
# add_subdirectory(${TORCHAO_ROOT}/kernels/cpu/aarch64 ${CMAKE_CURRENT_BINARY_DIR}/torchao_kernels_aarch64)
78-
79-
# add_executable(benchmark_linear_8bit_act_xbit_weight
80-
# benchmark_linear_8bit_act_xbit_weight.cpp
81-
# ${TORCHAO_ROOT}/ops/linear_8bit_act_xbit_weight/linear_8bit_act_xbit_weight.cpp
82-
# )
83-
# target_link_torchao_parallel_backend(benchmark_linear_8bit_act_xbit_weight "${TORCHAO_PARALLEL_BACKEND}")
84-
# target_link_libraries(
85-
# benchmark_linear_8bit_act_xbit_weight
86-
# PRIVATE
87-
# benchmark::benchmark
88-
# torchao_kernels_aarch64
89-
# )

0 commit comments

Comments
 (0)