Skip to content

Commit dce2fa2

Browse files
Sentimentronxnnpack-bot
authored andcommitted
[gn] Test building AVX-512
Because we don't test it in Github Actions, AVX-512 support has bit-rotted in GN a bit. Should take care of a cluster of failures in the latest Chrome integration attempt. [1] [1] https://chromium-review.googlesource.com/c/chromium/src/+/7615883?tab=checks PiperOrigin-RevId: 915679173
1 parent 9ab80cd commit dce2fa2

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,17 @@ jobs:
381381
git cl format --presubmit --no-clang-format --no-python --diff
382382
working-directory: ${{ github.workspace }}/xnnpack
383383
- name: Generate build files
384+
run: |
385+
gn gen --check --args="is_debug=false clang_use_chrome_plugins=false dcheck_always_on=true cc_wrapper=\"ccache\" symbol_level=0 xnnpack_enable_avx512=true target_cpu=\"x64\" use_siso=true" out/x64.dchecks
386+
working-directory: ${{ github.workspace }}/xnnpack
387+
- name: Build all targets (Release + debug checks, with AVX512)
388+
run: |
389+
autoninja -C out/x64.dchecks
390+
- name: Generate build files (no AVX512)
384391
run: |
385392
gn gen --check --args="is_debug=false clang_use_chrome_plugins=false dcheck_always_on=true cc_wrapper=\"ccache\" symbol_level=0 xnnpack_enable_avx512=false target_cpu=\"x64\" use_siso=true" out/x64.dchecks
386393
working-directory: ${{ github.workspace }}/xnnpack
387-
- name: Build all targets (Release + debug checks)
394+
- name: Build all targets (Release + debug checks, without AVX512)
388395
run: |
389396
autoninja -C out/x64.dchecks
390397
working-directory: ${{ github.workspace }}/xnnpack

BUILD.gn

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import("gen/avx256vnni_microkernels.bzl")
5151
import("gen/avx256vnnigfni_microkernels.bzl")
5252
import("gen/avx2_microkernels.bzl")
5353
import("gen/avx512amx_microkernels.bzl")
54+
import("gen/avx512bf16_microkernels.bzl")
5455
import("gen/avx512f_microkernels.bzl")
5556
import("gen/avx512fp16_microkernels.bzl")
5657
import("gen/avx512skx_microkernels.bzl")
@@ -601,6 +602,7 @@ if (current_cpu == "x64" || current_cpu == "x86") {
601602
sources += ALL_AVX512F_MICROKERNEL_SRCS
602603
sources += ALL_AVX512FP16_MICROKERNEL_SRCS
603604
sources += ALL_AVX512AMX_MICROKERNEL_SRCS
605+
sources += ALL_AVX512BF16_MICROKERNEL_SRCS
604606
sources += ALL_AVX512SKX_MICROKERNEL_SRCS
605607
sources += ALL_AVX512VBMI_MICROKERNEL_SRCS
606608

@@ -1135,7 +1137,7 @@ xnnpack_test("operators") {
11351137
# Benchmarks
11361138
#
11371139
if (!build_with_chromium) {
1138-
# XNNPACK's benchmarks don't seem to build agains the Google benchmark in
1140+
# XNNPACK's benchmarks don't seem to build against the Google benchmark in
11391141
# Chromium. TODO: figure out why.
11401142
xnnpack_source_set("benchmark_test_support") {
11411143
testonly = true

0 commit comments

Comments
 (0)