Skip to content

Commit da62330

Browse files
committed
Update
[ghstack-poisoned]
2 parents 6e2be2b + 4184f07 commit da62330

File tree

2 files changed

+49
-6
lines changed

2 files changed

+49
-6
lines changed

shim_et/xplat/executorch/build/build_variables.bzl

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# unnecessary duplication, and people will invariably forget to update one or the other.
1616
# 3) List them somewhere CMake and Buck can both get at them; that's this file. Buck
1717
# files can load() it, and our CMake build evaluates it with Python. (See
18-
# append_filelist in build/Codegen.cmake.)
18+
# executorch_append_filelist in build/Codegen.cmake.)
1919
#
2020
# Inconveniently, the Buck target layout is much more granular than the CMake library
2121
# layout, leading to several complications:
@@ -230,6 +230,27 @@ PORTABLE_KERNELS_SRCS = [
230230
"kernels/portable/cpu/pattern/unary_ufunc_realhbf16.cpp",
231231
]
232232

233+
KERNELS_UTIL_ALL_DEPS_SRCS = [
234+
"kernels/portable/cpu/util/activation_ops_util.cpp",
235+
"kernels/portable/cpu/util/advanced_index_util.cpp",
236+
"kernels/portable/cpu/util/arange_util.cpp",
237+
"kernels/portable/cpu/util/broadcast_util.cpp",
238+
"kernels/portable/cpu/util/copy_ops_util.cpp",
239+
"kernels/portable/cpu/util/delinearize_index.cpp",
240+
"kernels/portable/cpu/util/distance_util.cpp",
241+
"kernels/portable/cpu/util/dtype_util.cpp",
242+
"kernels/portable/cpu/util/index_util.cpp",
243+
"kernels/portable/cpu/util/kernel_ops_util.cpp",
244+
"kernels/portable/cpu/util/matmul_ops_util.cpp",
245+
"kernels/portable/cpu/util/normalization_ops_util.cpp",
246+
"kernels/portable/cpu/util/padding_util.cpp",
247+
"kernels/portable/cpu/util/reduce_util.cpp",
248+
"kernels/portable/cpu/util/repeat_util.cpp",
249+
"kernels/portable/cpu/util/select_copy_util.cpp",
250+
"kernels/portable/cpu/util/slice_util.cpp",
251+
"kernels/portable/cpu/util/upsample_util.cpp",
252+
]
253+
233254
OPTIMIZED_KERNELS_SRCS = [
234255
"kernels/optimized/cpu/binary_ops.cpp",
235256
"kernels/optimized/cpu/op_add.cpp",
@@ -297,11 +318,24 @@ OPTIMIZED_NATIVE_CPU_OPS_SRCS = [
297318
"kernels/optimized/cpu/op_where.cpp",
298319
]
299320

321+
TEST_BACKEND_COMPILER_LIB_SRCS = [
322+
"runtime/executor/test/test_backend_compiler_lib.cpp",
323+
]
324+
300325
EXTENSION_DATA_LOADER_SRCS = [
301326
"extension/data_loader/file_data_loader.cpp",
302327
"extension/data_loader/mmap_data_loader.cpp",
303328
]
304329

330+
EXTENSION_EVALUE_UTIL_SRCS = [
331+
"extension/evalue_util/print_evalue.cpp",
332+
]
333+
334+
EXTENSION_FLAT_TENSOR_SRCS = [
335+
"extension/flat_tensor/flat_tensor_data_map.cpp",
336+
"extension/flat_tensor/serialize/flat_tensor_header.cpp",
337+
]
338+
305339
EXTENSION_MODULE_SRCS = [
306340
"extension/module/module.cpp",
307341
]

tools/cmake/Codegen.cmake

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ endfunction()
346346

347347
# Append the file list in the variable named `name` in build/build_variables.bzl
348348
# to the variable named `outputvar` in the caller's scope.
349-
function(append_filelist name outputvar)
349+
function(executorch_append_filelist name outputvar)
350350
# configure_file adds its input to the list of CMAKE_RERUN dependencies
351351
configure_file(
352352
${PROJECT_SOURCE_DIR}/shim_et/xplat/executorch/build/build_variables.bzl
@@ -390,12 +390,16 @@ function(executorch_validate_build_variables)
390390
EXECUTORCH_SRCS
391391
EXECUTORCH_CORE_SRCS
392392
PORTABLE_KERNELS_SRCS
393+
KERNELS_UTIL_ALL_DEPS_SRCS
393394
OPTIMIZED_KERNELS_SRCS
394395
QUANTIZED_KERNELS_SRCS
395396
PROGRAM_SCHEMA_SRCS
396397
OPTIMIZED_CPUBLAS_SRCS
397398
OPTIMIZED_NATIVE_CPU_OPS_SRCS
399+
TEST_BACKEND_COMPILER_LIB_SRCS
398400
EXTENSION_DATA_LOADER_SRCS
401+
EXTENSION_EVALUE_UTIL_SRCS
402+
EXTENSION_FLAT_TENSOR_SRCS
399403
EXTENSION_MODULE_SRCS
400404
EXTENSION_RUNNER_UTIL_SRCS
401405
EXTENSION_LLM_RUNNER_SRCS
@@ -419,12 +423,16 @@ function(executorch_validate_build_variables)
419423
_executorch__srcs
420424
_executorch_core__srcs
421425
_portable_kernels__srcs
426+
_kernels_util_all_deps__srcs
422427
_optimized_kernels__srcs
423428
_quantized_kernels__srcs
424429
_program_schema__srcs
425430
_optimized_cpublas__srcs
426431
_optimized_native_cpu_ops__srcs
432+
_test_backend_compiler_lib__srcs
427433
_extension_data_loader__srcs
434+
_extension_evalue_util__srcs
435+
_extension_flat_tensor__srcs
428436
_extension_module__srcs
429437
_extension_runner_util__srcs
430438
_extension_llm_runner__srcs
@@ -450,21 +458,22 @@ function(executorch_validate_build_variables)
450458
if("${filelist_and_varname_1}" STREQUAL "_custom_ops__srcs")
451459
continue()
452460
endif()
453-
append_filelist(
461+
executorch_append_filelist(
454462
${filelist_and_varname_0}
455463
"${filelist_and_varname_1}_from_build_variables"
456464
)
457465
if(NOT ${filelist_and_varname_1} STREQUAL
458466
${filelist_and_varname_1}_from_build_variables
459467
)
460468
list(JOIN ${filelist_and_varname_1} "\n" pretty_buck_generated_list)
461-
list(JOIN ${filelist_and_varname_1}_from_build_variables "\n" pretty_hardcoded_list)
469+
list(JOIN ${filelist_and_varname_1}_from_build_variables "\n"
470+
pretty_hardcoded_list
471+
)
462472
message(
463473
FATAL_ERROR
464474
"Buck-generated ${filelist_and_varname_1} does not match hardcoded "
465475
"${filelist_and_varname_0} in build_variables.bzl. Left: "
466-
"${pretty_buck_generated_list}\n "
467-
"Right: ${pretty_hardcoded_list}"
476+
"${pretty_buck_generated_list}\n " "Right: ${pretty_hardcoded_list}"
468477
)
469478
endif()
470479
endforeach()

0 commit comments

Comments
 (0)