Skip to content

Update XNNPACK revision to fcbf55a #2223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
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
8 changes: 0 additions & 8 deletions backends/xnnpack/runtime/XNNExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,7 @@ Error XNNExecutor::set_external_input(
ET_LOG(Error, "Input dim mismatch between tensor and shape struct");
}

#ifdef ENABLE_DYNAMIC_QUANTIZATION
externals_.emplace_back(xnn_external_value{
id,
input->mutable_data_ptr(),
static_cast<size_t>(shape->num_dims),
shape->dim});
#else
externals_.emplace_back(xnn_external_value{id, input->mutable_data_ptr()});
#endif
return Error::Ok;
}

Expand Down
8 changes: 0 additions & 8 deletions backends/xnnpack/runtime/XNNExecutor.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,8 @@ class XNNExecutor {
outputs.size());

for (int i = 0; i < outputs.size(); i++) {
#ifdef ENABLE_DYNAMIC_QUANTIZATION
externals_.emplace_back(xnn_external_value{
output_ids_[i],
outputs[i]->mutable_data_ptr<float>(),
static_cast<size_t>(output_shapes[i].num_dims),
output_shapes[i].dim});
#else
externals_.emplace_back(xnn_external_value{
output_ids_[i], outputs[i]->mutable_data_ptr<float>()});
#endif
}

return Error::Ok;
Expand Down
2 changes: 1 addition & 1 deletion backends/xnnpack/third-party/XNNPACK
Submodule XNNPACK updated 3091 files
2 changes: 2 additions & 0 deletions backends/xnnpack/third-party/generate-xnnpack-wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"PROD_AVX512F_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
"PROD_AVX512SKX_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
"PROD_AVX512VBMI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
"PROD_AVX512VNNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
"PROD_RVV_MICROKERNEL_SRCS": "defined(__riscv) || defined(__riscv__)",
"PROD_AVXVNNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
Expand Down Expand Up @@ -80,6 +81,7 @@
"PROD_AVX512F_MICROKERNEL_SRCS",
"PROD_AVX512SKX_MICROKERNEL_SRCS",
"PROD_AVX512VBMI_MICROKERNEL_SRCS",
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS",
"PROD_AVX512VNNI_MICROKERNEL_SRCS",
"PROD_RVV_MICROKERNEL_SRCS",
"PROD_AVXVNNI_MICROKERNEL_SRCS",
Expand Down
38 changes: 38 additions & 0 deletions backends/xnnpack/third-party/xnnpack.buck.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ load(
"PROD_AVX512F_MICROKERNEL_SRCS",
"PROD_AVX512SKX_MICROKERNEL_SRCS",
"PROD_AVX512VBMI_MICROKERNEL_SRCS",
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS",
"PROD_AVX512VNNI_MICROKERNEL_SRCS",
"PROD_AVXVNNI_MICROKERNEL_SRCS",
"PROD_AVX_MICROKERNEL_SRCS",
Expand Down Expand Up @@ -1125,9 +1126,45 @@ def define_xnnpack():
],
)

AVX512VNNIGFNI_COMPILER_FLAGS = AVX512VNNI_COMPILER_FLAGS + [
"-mgfni",
]

# @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode.
native.cxx_library(
name = "ukernels_avx512vnnigfni",
srcs = select({
"DEFAULT": PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS,
"ovr_config//cpu:arm32": DEFAULT_DUMMY_SRC,
"ovr_config//cpu:arm64": DEFAULT_DUMMY_SRC,
}),
headers = subdir_glob([
("XNNPACK/src", "**/*.h"),
("XNNPACK/src", "**/*.c"),
]),
header_namespace = "",
compiler_flags = [
"-O2",
"-Wno-error=missing-braces", # required since the SGX toolchain does not have this by default
] + select({
"DEFAULT": AVX512VNNIGFNI_COMPILER_FLAGS,
"ovr_config//cpu:arm32": [],
"ovr_config//cpu:arm64": [],
}),
preferred_linkage = "static",
preprocessor_flags = [
"-DXNN_LOG_LEVEL=0",
],
exported_deps = [
":interface",
],
)

AVXVNNI_COMPILER_FLAGS = [
"-mavx2",
"-mavxvnni",
"-mf16c",
"-mfma",
]

# @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode.
Expand Down Expand Up @@ -1180,6 +1217,7 @@ def define_xnnpack():
":ukernels_ssse3",
":ukernels_xop",
":ukernels_avx512vbmi",
":ukernels_avx512vnnigfni",
":ukernels_avx512vnni",
":ukernels_avxvnni",
]
Expand Down
Loading