File tree Expand file tree Collapse file tree 3 files changed +10
-15
lines changed
shim_et/xplat/executorch/build Expand file tree Collapse file tree 3 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 1+ load ("@fbsource//xplat/executorch/build:build_variables.bzl" , "EXTENSION_LLM_CUSTOM_OPS_BUCK_SRCS" )
12load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
23load (
34 "@fbsource//xplat/executorch/kernels/optimized:lib_defs.bzl" ,
@@ -30,12 +31,7 @@ def define_common_targets():
3031 for mkl_dep in ["" , "_mkl_noomp" ]:
3132 runtime .cxx_library (
3233 name = "custom_ops" + mkl_dep ,
33- srcs = [
34- "op_fallback.cpp" ,
35- "op_fast_hadamard_transform.cpp" ,
36- "op_sdpa.cpp" ,
37- "op_update_cache.cpp" ,
38- ],
34+ srcs = EXTENSION_LLM_CUSTOM_OPS_BUCK_SRCS ,
3935 exported_headers = [
4036 "op_fallback.h" ,
4137 "op_fast_hadamard_transform.h" ,
Original file line number Diff line number Diff line change @@ -493,13 +493,15 @@ VULKAN_SCHEMA_SRCS = [
493493 "backends/vulkan/serialization/schema.fbs" ,
494494]
495495
496- CUSTOM_OPS_SRCS = [
497- "extension/llm/custom_ops/op_fallback.cpp" ,
498- "extension/llm/custom_ops/op_fast_hadamard_transform.cpp" ,
499- "extension/llm/custom_ops/op_sdpa.cpp" ,
500- "extension/llm/custom_ops/op_update_cache.cpp" ,
496+ EXTENSION_LLM_CUSTOM_OPS_BUCK_SRCS = [
497+ "op_fallback.cpp" ,
498+ "op_fast_hadamard_transform.cpp" ,
499+ "op_sdpa.cpp" ,
500+ "op_update_cache.cpp" ,
501+ ]
502+
503+ CUSTOM_OPS_SRCS = ["extension/llm/custom_ops/" + x for x in EXTENSION_LLM_CUSTOM_OPS_BUCK_SRCS ] + [
501504 "extension/llm/custom_ops/spinquant/fast_hadamard_transform.cpp" ,
502- "kernels/portable/cpu/util/reduce_util.cpp" ,
503505]
504506
505507LLAMA_RUNNER_SRCS = [
Original file line number Diff line number Diff line change @@ -455,9 +455,6 @@ function(executorch_validate_build_variables)
455455 foreach (filelist_and_varname IN ZIP_LISTS BUILD_VARIABLES_FILELISTS
456456 BUILD_VARIABLES_VARNAMES
457457 )
458- if ("${filelist_and_varname_1} " STREQUAL "_custom_ops__srcs" )
459- continue ()
460- endif ()
461458 executorch_append_filelist(
462459 ${filelist_and_varname_0}
463460 "${filelist_and_varname_1} _from_build_variables"
You can’t perform that action at this time.
0 commit comments