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" )
1
2
load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "runtime" )
2
3
load (
3
4
"@fbsource//xplat/executorch/kernels/optimized:lib_defs.bzl" ,
@@ -30,12 +31,7 @@ def define_common_targets():
30
31
for mkl_dep in ["" , "_mkl_noomp" ]:
31
32
runtime .cxx_library (
32
33
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 ,
39
35
exported_headers = [
40
36
"op_fallback.h" ,
41
37
"op_fast_hadamard_transform.h" ,
Original file line number Diff line number Diff line change @@ -493,13 +493,15 @@ VULKAN_SCHEMA_SRCS = [
493
493
"backends/vulkan/serialization/schema.fbs" ,
494
494
]
495
495
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 ] + [
501
504
"extension/llm/custom_ops/spinquant/fast_hadamard_transform.cpp" ,
502
- "kernels/portable/cpu/util/reduce_util.cpp" ,
503
505
]
504
506
505
507
LLAMA_RUNNER_SRCS = [
Original file line number Diff line number Diff line change @@ -455,9 +455,6 @@ function(executorch_validate_build_variables)
455
455
foreach (filelist_and_varname IN ZIP_LISTS BUILD_VARIABLES_FILELISTS
456
456
BUILD_VARIABLES_VARNAMES
457
457
)
458
- if ("${filelist_and_varname_1} " STREQUAL "_custom_ops__srcs" )
459
- continue ()
460
- endif ()
461
458
executorch_append_filelist (
462
459
${filelist_and_varname_0}
463
460
"${filelist_and_varname_1} _from_build_variables"
You can’t perform that action at this time.
0 commit comments