diff --git a/backends/xnnpack/cmake/Dependencies.cmake b/backends/xnnpack/cmake/Dependencies.cmake index 4fb80d5c18c..d02ac4a7926 100644 --- a/backends/xnnpack/cmake/Dependencies.cmake +++ b/backends/xnnpack/cmake/Dependencies.cmake @@ -66,6 +66,10 @@ if(WIN32) set_overridable_option(XNNPACK_ENABLE_AVX256VNNI OFF) set_overridable_option(XNNPACK_ENABLE_AVX256VNNIGFNI OFF) set_overridable_option(XNNPACK_ENABLE_AVX512BF16 OFF) + # clang-cl (reported by CMake as Clang, not MSVC, so XNNPACK's own MSVC gate + # does not catch it) crashes with an internal codegen error compiling some of + # the AVX512-FP16 micro-kernels, so disable them on Windows. + set_overridable_option(XNNPACK_ENABLE_AVX512FP16 OFF) endif() set(XNNPACK_BUILD_ALL_MICROKERNELS diff --git a/backends/xnnpack/third-party/XNNPACK b/backends/xnnpack/third-party/XNNPACK index 1adaa7c709d..92a7ad501b9 160000 --- a/backends/xnnpack/third-party/XNNPACK +++ b/backends/xnnpack/third-party/XNNPACK @@ -1 +1 @@ -Subproject commit 1adaa7c709d4839d29e1f219cb962b01c9e6a905 +Subproject commit 92a7ad501b9516f9fecae119e0146dd1f58e54c1 diff --git a/backends/xnnpack/third-party/xnnpack.buck.bzl b/backends/xnnpack/third-party/xnnpack.buck.bzl index ac861435af8..3aa82f89cd4 100644 --- a/backends/xnnpack/third-party/xnnpack.buck.bzl +++ b/backends/xnnpack/third-party/xnnpack.buck.bzl @@ -70,7 +70,10 @@ def define_xnnpack(): # @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode. native.cxx_library( name = "subgraph", - srcs = SUBGRAPH_SRCS + ["XNNPACK/src/datatype.c"], + srcs = SUBGRAPH_SRCS + [ + "XNNPACK/src/datatype.c", + "XNNPACK/src/subgraph/rewrites/cvt_to_fp32.cc", + ], compiler_flags = [ "-Wno-error=missing-braces", # required since the SGX toolchain does not have this by default ], @@ -1150,6 +1153,7 @@ def define_xnnpack(): "XNNPACK/src/init.c", "XNNPACK/src/params.c", "XNNPACK/src/configs/hardware-config.c", + "XNNPACK/src/xnnpack/init-once.c", "XNNPACK/src/microparams-init.c", "XNNPACK/src/microkernel-utils.c", "XNNPACK/src/reference/binary-elementwise.cc",