Skip to content

Commit a41a9e8

Browse files
guangy10mcr229
authored andcommitted
Back out "Build CPUBLAS as a separate CMake target" (#2610)
Summary: Pull Request resolved: #2610 Original commit changeset: 8bcf3e145471 Original Phabricator Diff: D55263773 bypass-github-export-checks Reviewed By: dbort Differential Revision: D55274433 fbshipit-source-id: 1d54d11f91cd07a5beb1d656641a40ad80eed6bb
1 parent a9dc341 commit a41a9e8

File tree

3 files changed

+2
-47
lines changed

3 files changed

+2
-47
lines changed

build/Utils.cmake

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,6 @@
2020
# It should also be cmake-lint clean.
2121
#
2222

23-
# Platform-specific definitions.
24-
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
25-
set(arm64 ON)
26-
else()
27-
set(arm64 OFF)
28-
endif()
29-
30-
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
31-
set(x86 ON)
32-
else()
33-
set(x86 OFF)
34-
endif()
35-
3623
# Public function to print summary for all configurations. For new variables,
3724
# it's recommended to add them here.
3825
function(executorch_print_configuration_summary)
@@ -45,8 +32,6 @@ function(executorch_print_configuration_summary)
4532
message(STATUS " BUCK2 : ${BUCK2}")
4633
message(STATUS " PYTHON_EXECUTABLE : ${PYTHON_EXECUTABLE}")
4734
message(STATUS " FLATC_EXECUTABLE : ${FLATC_EXECUTABLE}")
48-
message(STATUS " X86 : ${x86}")
49-
message(STATUS " ARM64 : ${arm64}")
5035
message(
5136
STATUS " EXECUTORCH_ENABLE_LOGGING : ${EXECUTORCH_ENABLE_LOGGING}")
5237
message(
@@ -135,4 +120,4 @@ function(extract_sources sources_file)
135120
message(FATAL_ERROR "executorch: source list generation failed")
136121
endif()
137122
endif()
138-
endfunction()
123+
endfunction()

build/cmake_deps.toml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ excludes = [
5656
# Exclude the codegen templates, which are picked up because the buck target
5757
# is the generated_lib and not the unwrapped set of kernels.
5858
"^codegen/templates",
59-
# Exclude blas, since it's built as a separate target.
60-
"^kernels/optimized/blas",
6159
]
6260
deps = [
6361
"executorch",
@@ -87,19 +85,6 @@ filters = [
8785
".fbs$",
8886
]
8987

90-
[targets.optimized_cpublas]
91-
buck_targets = [
92-
"//kernels/optimized:libblas",
93-
]
94-
filters = [
95-
".cpp$",
96-
]
97-
excludes = [
98-
]
99-
deps = [
100-
"executorch",
101-
]
102-
10388
# ---------------------------------- core end ----------------------------------
10489
# ---------------------------------- extension start ----------------------------------
10590

kernels/optimized/CMakeLists.txt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,9 @@ endif()
3030

3131
set(_common_compile_options -Wno-deprecated-declarations)
3232

33-
# Set platform-specific definitions.
34-
if(arm64)
35-
list(APPEND _common_compile_options -DET_BUILD_WITH_BLAS)
36-
elseif(x86)
37-
# TODO(T183193812) Enable once sleef is built in OSS.
38-
# list(APPEND _common_compile_options -DCPU_CAPABILITY_AVX2)
39-
endif()
40-
4133
include(${EXECUTORCH_ROOT}/build/Utils.cmake)
4234
include(${EXECUTORCH_ROOT}/build/Codegen.cmake)
4335

44-
# Build cpublas.
45-
list(TRANSFORM _optimized_cpublas__srcs PREPEND "${EXECUTORCH_ROOT}/")
46-
add_library(cpublas ${_optimized_cpublas__srcs})
47-
target_link_libraries(cpublas PRIVATE executorch)
48-
target_compile_options(cpublas PUBLIC ${_common_compile_options})
49-
50-
5136
# Generate C++ bindings to register kernels into both PyTorch (for AOT) and
5237
# Executorch (for runtime). Here select all ops in optimized.yaml
5338
set(_yaml "${CMAKE_CURRENT_LIST_DIR}/optimized-oss.yaml")
@@ -59,7 +44,7 @@ message("Generated files ${gen_command_sources}")
5944

6045
list(TRANSFORM _optimized_kernels__srcs PREPEND "${EXECUTORCH_ROOT}/")
6146
add_library(optimized_kernels ${_optimized_kernels__srcs})
62-
target_link_libraries(optimized_kernels PRIVATE executorch cpublas)
47+
target_link_libraries(optimized_kernels PRIVATE executorch)
6348
target_compile_options(optimized_kernels PUBLIC ${_common_compile_options})
6449
# Build a library for _optimized_kernels_srcs
6550
#

0 commit comments

Comments
 (0)