Skip to content

Commit 9aee068

Browse files
committed
Revert "Add vectorized_math.h (#11204)"
This reverts commit 1720f2f.
1 parent d83bed3 commit 9aee068

File tree

9 files changed

+23
-278
lines changed

9 files changed

+23
-278
lines changed

.lintrunner.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,6 @@ exclude_patterns = [
271271
'examples/**',
272272
'exir/verification/bindings.cpp',
273273
'extension/**',
274-
# Uses properly-gated (ET_USE_PYTORCH_HEADERS) ATen include.
275-
'kernels/portable/cpu/util/vectorized_math.h',
276274
'kernels/optimized/**',
277275
'runtime/core/exec_aten/**',
278276
# Want to be able to keep c10 in sync with PyTorch core.

kernels/portable/cpu/util/targets.bzl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,6 @@ def define_common_targets():
307307
],
308308
)
309309

310-
runtime.cxx_library(
311-
name = "vectorized_math",
312-
exported_headers = ["vectorized_math.h"],
313-
visibility = ["//executorch/..."],
314-
exported_deps = [
315-
"//executorch/runtime/core/portable_type:portable_type",
316-
"//executorch/runtime/core/exec_aten/util:scalar_type_util",
317-
],
318-
)
319-
320310
# Utility functions that can be used by operators that perform reduction
321311
for aten_mode in get_aten_mode_options():
322312
suffix = "_aten" if aten_mode else ""

kernels/portable/cpu/util/test/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,26 @@
44
# This source code is licensed under the BSD-style license found in the
55
# LICENSE file in the root directory of this source tree.
66

7+
# @generated by test/utils/generate_gtest_cmakelists.py
8+
#
9+
# This file should be formatted with
10+
# ~~~
11+
# cmake-format -i CMakeLists.txt
12+
# ~~~
13+
# It should also be cmake-lint clean.
14+
#
15+
716
cmake_minimum_required(VERSION 3.19)
817

918
set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../../..)
1019

1120
include(${EXECUTORCH_ROOT}/tools/cmake/Test.cmake)
12-
include(${EXECUTORCH_ROOT}/tools/cmake/Utils.cmake)
1321

1422
set(_test_srcs broadcast_indexes_range_test.cpp broadcast_test.cpp
15-
reduce_test.cpp vectorized_math_test.cpp
23+
reduce_test.cpp
1624
)
1725

1826
et_cxx_test(
1927
kernels_portable_cpu_util_test SOURCES ${_test_srcs} EXTRA_LIBS
2028
portable_kernels portable_ops_lib
2129
)
22-
23-
find_package_torch_headers()
24-
target_include_directories(kernels_portable_cpu_util_test PRIVATE ${TORCH_INCLUDE_DIRS})
25-
target_compile_definitions(kernels_portable_cpu_util_test PRIVATE ET_USE_PYTORCH_HEADERS)

kernels/portable/cpu/util/test/targets.bzl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,3 @@ def define_common_targets():
3232
"//executorch/kernels/portable/cpu/util:reduce_util",
3333
],
3434
)
35-
36-
# this test requires ET_USE_PYTORCH_HEADERS, which doesn't work in OSS Buck.
37-
if not runtime.is_oss:
38-
runtime.cxx_test(
39-
name = "vectorized_math_test",
40-
srcs = ["vectorized_math_test.cpp"],
41-
deps = [
42-
"//executorch/kernels/portable/cpu/util:vectorized_math",
43-
"//executorch/runtime/core/portable_type/c10/c10:c10",
44-
],
45-
)

kernels/portable/cpu/util/test/vectorized_math_test.cpp

Lines changed: 0 additions & 95 deletions
This file was deleted.

kernels/portable/cpu/util/vectorized_math.h

Lines changed: 0 additions & 148 deletions
This file was deleted.

runtime/core/portable_type/c10/c10/targets.bzl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ def define_common_targets():
5353
runtime.cxx_library(
5454
name = "aten_headers_for_executorch",
5555
srcs = [],
56-
visibility = [
57-
"//executorch/kernels/optimized/...",
58-
"//executorch/kernels/portable/cpu/util/...",
59-
"@EXECUTORCH_CLIENTS",
60-
],
56+
visibility = ["//executorch/kernels/optimized/...", "@EXECUTORCH_CLIENTS"],
6157
exported_deps = select({
6258
"DEFAULT": [],
6359
"ovr_config//cpu:arm64": [

runtime/core/portable_type/targets.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def define_common_targets():
2626
visibility = [
2727
"//executorch/backends/...",
2828
"//executorch/extension/fb/dynamic_shim/...",
29-
"//executorch/kernels/portable/cpu/...",
3029
"//executorch/runtime/core/exec_aten/...",
3130
"//executorch/runtime/core/portable_type/test/...",
3231
],

test/utils/OSSTestConfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@
6868
"extension_threadpool"
6969
]
7070
},
71+
{
72+
"directory": "kernels/portable/cpu/util/test",
73+
"sources": [
74+
"broadcast_indexes_range_test.cpp",
75+
"broadcast_test.cpp",
76+
"reduce_test.cpp"
77+
],
78+
"additional_libs": [
79+
"portable_kernels",
80+
"portable_ops_lib"
81+
]
82+
},
7183
{
7284
"directory": "runtime/core/portable_type/test",
7385
"sources": [

0 commit comments

Comments
 (0)