diff --git a/backends/xnnpack/third-party/XNNPACK b/backends/xnnpack/third-party/XNNPACK index 84096dd536e..52208356940 160000 --- a/backends/xnnpack/third-party/XNNPACK +++ b/backends/xnnpack/third-party/XNNPACK @@ -1 +1 @@ -Subproject commit 84096dd536edffd19337d9297634c4f5c5449bfd +Subproject commit 52208356940a7c7d3597cf386d500a0f776f7bd0 diff --git a/backends/xnnpack/third-party/xnnpack.buck.bzl b/backends/xnnpack/third-party/xnnpack.buck.bzl index 8556fde3d8a..eb45c65577a 100644 --- a/backends/xnnpack/third-party/xnnpack.buck.bzl +++ b/backends/xnnpack/third-party/xnnpack.buck.bzl @@ -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", ) @@ -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", @@ -1100,7 +1100,16 @@ def define_xnnpack(): # "-DXNN_ENABLE_DWCONV_MULTIPLASS=1", "-DXNN_ENABLE_ARM_I8MM=1", "-DXNN_ENABLE_ARM_FP16_VECTOR=1", - "-DXNN_ENABLE_AVX512BF16=0" + "-DXNN_ENABLE_AVX512BF16=1" + "-DXNN_ENABLE_AVX512F=1", + "-DXNN_ENABLE_AVX512SKX=1", + "-DXNN_ENABLE_AVX512VNNI=1", + "-DXNN_ENABLE_AVX512VNNIGFNI=1", + "-DXNN_ENABLE_AVX512AMX=1", + "-DXNN_ENABLE_AVX512VBMI=1", + "-DXNN_ENABLE_AVX512FP16=1", + "-DXNN_ENABLE_AVXVNNIINT8=1", + "-DXNN_ENABLE_AVX256VNNIGFNI=1", ], visibility = ["PUBLIC"], exported_deps = COMMON_XNNPACK_DEPS + [ diff --git a/backends/xnnpack/third-party/xnnpack_src_defs.bzl b/backends/xnnpack/third-party/xnnpack_src_defs.bzl index cb1f635e79e..25477e8c718 100644 --- a/backends/xnnpack/third-party/xnnpack_src_defs.bzl +++ b/backends/xnnpack/third-party/xnnpack_src_defs.bzl @@ -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] @@ -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)