Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backends/xnnpack/third-party/xnnpack.buck.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ load(
"OPERATOR_SRCS",
"SUBGRAPH_SRCS",
"TABLE_SRCS",
"XNNPACK_SRCS",
"get_xnnpack_headers",
"get_ukernel_config_srcs",
"prod_srcs_for_arch_wrapper",
)

Expand Down Expand Up @@ -1070,7 +1070,7 @@ def define_xnnpack():
# @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode.
native.cxx_library(
name = "XNNPACK",
srcs = XNNPACK_SRCS + LOGGING_SRCS + [
srcs = get_ukernel_config_srcs() + LOGGING_SRCS + [
"XNNPACK/src/init.c",
"XNNPACK/src/params.c",
"XNNPACK/src/configs/hardware-config.c",
Expand Down
32 changes: 5 additions & 27 deletions backends/xnnpack/third-party/xnnpack_src_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,6 @@ load("//backends/xnnpack/third-party/XNNPACK/gen:microkernels.bzl", "prod_srcs_f
load("@fbsource//xplat/executorch/third-party:glob_defs.bzl", "subdir_glob")

# To get from XNNPACK:build_srcs.bzl in the future
_XNNPACK_SRCS = [
"src/configs/argmaxpool-config.c",
"src/configs/avgpool-config.c",
"src/configs/binary-elementwise-config.c",
"src/configs/cmul-config.c",
"src/configs/conv-hwc2chw-config.c",
"src/configs/dwconv-config.c",
"src/configs/dwconv2d-chw-config.c",
"src/configs/gemm-config.c",
"src/configs/ibilinear-chw-config.c",
"src/configs/ibilinear-config.c",
"src/configs/lut32norm-config.c",
"src/configs/maxpool-config.c",
"src/configs/pack-lh-config.c",
"src/configs/raddstoreexpminusmax-config.c",
"src/configs/reduce-config.c",
"src/configs/spmm-config.c",
"src/configs/transpose-config.c",
"src/configs/unary-elementwise-config.c",
"src/configs/unpool-config.c",
"src/configs/vmulcaddc-config.c",
"src/configs/x8-lut-config.c",
"src/configs/xx-fill-config.c",
"src/configs/xx-pad-config.c",
]

def define_xnnpack_build_src(xnnpack_build_src):
return ["XNNPACK/{}".format(src) for src in xnnpack_build_src]

Expand All @@ -56,8 +30,12 @@ def get_xnnpack_headers():
])
return src_headers | include_headers | ukernel_headers

def get_ukernel_config_srcs():
return subdir_glob([
("XNNPACK/src/configs", "*.c"),
]).values()

OPERATOR_SRCS = define_xnnpack_build_src(_OPERATOR_SRCS)
SUBGRAPH_SRCS = define_xnnpack_build_src(_SUBGRAPH_SRCS)
TABLE_SRCS = define_xnnpack_build_src(_TABLE_SRCS)
XNNPACK_SRCS = define_xnnpack_build_src(_XNNPACK_SRCS)
LOGGING_SRCS = define_xnnpack_build_src(_LOGGING_SRCS)
Loading