Skip to content

Commit c7fb967

Browse files
GregoryComerfacebook-github-bot
authored andcommitted
Update XNNPACK revision to fcbf55a (#2223)
Summary: Update the revision of the XNNPACK library dependency to fcbf55a. Note that this is part of a synchronized update of XNNPACK for ExecuTorch, PyTorch, and Meta internal. bypass-github-export-checks bypass-github-pytorch-ci-checks bypass-github-executorch-ci-checks allow-large-files Pull Request resolved: #2223 Test Plan: Tested via internal and external CI for PyTorch and ExecuTorch. Also note that the full changeset was tested via D54463495. Reviewed By: mcr229 Differential Revision: D54499911 Pulled By: GregoryComer fbshipit-source-id: b9e2d3bbb44e63f7c3a422c215b8a7915adce46d
1 parent b22c224 commit c7fb967

File tree

7 files changed

+200
-353
lines changed

7 files changed

+200
-353
lines changed

backends/xnnpack/runtime/XNNExecutor.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,7 @@ Error XNNExecutor::set_external_input(
3232
ET_LOG(Error, "Input dim mismatch between tensor and shape struct");
3333
}
3434

35-
#ifdef ENABLE_DYNAMIC_QUANTIZATION
36-
externals_.emplace_back(xnn_external_value{
37-
id,
38-
input->mutable_data_ptr(),
39-
static_cast<size_t>(shape->num_dims),
40-
shape->dim});
41-
#else
4235
externals_.emplace_back(xnn_external_value{id, input->mutable_data_ptr()});
43-
#endif
4436
return Error::Ok;
4537
}
4638

backends/xnnpack/runtime/XNNExecutor.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,16 +124,8 @@ class XNNExecutor {
124124
outputs.size());
125125

126126
for (int i = 0; i < outputs.size(); i++) {
127-
#ifdef ENABLE_DYNAMIC_QUANTIZATION
128-
externals_.emplace_back(xnn_external_value{
129-
output_ids_[i],
130-
outputs[i]->mutable_data_ptr<float>(),
131-
static_cast<size_t>(output_shapes[i].num_dims),
132-
output_shapes[i].dim});
133-
#else
134127
externals_.emplace_back(xnn_external_value{
135128
output_ids_[i], outputs[i]->mutable_data_ptr<float>()});
136-
#endif
137129
}
138130

139131
return Error::Ok;

backends/xnnpack/third-party/XNNPACK

Submodule XNNPACK updated 3091 files

backends/xnnpack/third-party/generate-xnnpack-wrappers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"PROD_AVX512F_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
3737
"PROD_AVX512SKX_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
3838
"PROD_AVX512VBMI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
39+
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
3940
"PROD_AVX512VNNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
4041
"PROD_RVV_MICROKERNEL_SRCS": "defined(__riscv) || defined(__riscv__)",
4142
"PROD_AVXVNNI_MICROKERNEL_SRCS": "defined(__i386__) || defined(__i686__) || defined(__x86_64__)",
@@ -80,6 +81,7 @@
8081
"PROD_AVX512F_MICROKERNEL_SRCS",
8182
"PROD_AVX512SKX_MICROKERNEL_SRCS",
8283
"PROD_AVX512VBMI_MICROKERNEL_SRCS",
84+
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS",
8385
"PROD_AVX512VNNI_MICROKERNEL_SRCS",
8486
"PROD_RVV_MICROKERNEL_SRCS",
8587
"PROD_AVXVNNI_MICROKERNEL_SRCS",

backends/xnnpack/third-party/xnnpack.buck.bzl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ load(
1717
"PROD_AVX512F_MICROKERNEL_SRCS",
1818
"PROD_AVX512SKX_MICROKERNEL_SRCS",
1919
"PROD_AVX512VBMI_MICROKERNEL_SRCS",
20+
"PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS",
2021
"PROD_AVX512VNNI_MICROKERNEL_SRCS",
2122
"PROD_AVXVNNI_MICROKERNEL_SRCS",
2223
"PROD_AVX_MICROKERNEL_SRCS",
@@ -1125,9 +1126,45 @@ def define_xnnpack():
11251126
],
11261127
)
11271128

1129+
AVX512VNNIGFNI_COMPILER_FLAGS = AVX512VNNI_COMPILER_FLAGS + [
1130+
"-mgfni",
1131+
]
1132+
1133+
# @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode.
1134+
native.cxx_library(
1135+
name = "ukernels_avx512vnnigfni",
1136+
srcs = select({
1137+
"DEFAULT": PROD_AVX512VNNIGFNI_MICROKERNEL_SRCS,
1138+
"ovr_config//cpu:arm32": DEFAULT_DUMMY_SRC,
1139+
"ovr_config//cpu:arm64": DEFAULT_DUMMY_SRC,
1140+
}),
1141+
headers = subdir_glob([
1142+
("XNNPACK/src", "**/*.h"),
1143+
("XNNPACK/src", "**/*.c"),
1144+
]),
1145+
header_namespace = "",
1146+
compiler_flags = [
1147+
"-O2",
1148+
"-Wno-error=missing-braces", # required since the SGX toolchain does not have this by default
1149+
] + select({
1150+
"DEFAULT": AVX512VNNIGFNI_COMPILER_FLAGS,
1151+
"ovr_config//cpu:arm32": [],
1152+
"ovr_config//cpu:arm64": [],
1153+
}),
1154+
preferred_linkage = "static",
1155+
preprocessor_flags = [
1156+
"-DXNN_LOG_LEVEL=0",
1157+
],
1158+
exported_deps = [
1159+
":interface",
1160+
],
1161+
)
1162+
11281163
AVXVNNI_COMPILER_FLAGS = [
11291164
"-mavx2",
11301165
"-mavxvnni",
1166+
"-mf16c",
1167+
"-mfma",
11311168
]
11321169

11331170
# @lint-ignore BUCKLINT: native and fb_native are explicitly forbidden in fbcode.
@@ -1180,6 +1217,7 @@ def define_xnnpack():
11801217
":ukernels_ssse3",
11811218
":ukernels_xop",
11821219
":ukernels_avx512vbmi",
1220+
":ukernels_avx512vnnigfni",
11831221
":ukernels_avx512vnni",
11841222
":ukernels_avxvnni",
11851223
]

0 commit comments

Comments
 (0)