Skip to content

Commit ff5cd30

Browse files
authored
Merge branch 'master' into sme1_gemm_support
2 parents 1ddfdb3 + 90de09c commit ff5cd30

File tree

11,495 files changed

+323820
-640544
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,495 files changed

+323820
-640544
lines changed

.clang-format

+1-34
Original file line numberDiff line numberDiff line change
@@ -1,34 +1 @@
1-
AllowShortFunctionsOnASingleLine: Inline
2-
PackConstructorInitializers: Never
3-
ColumnLimit: 120
4-
AlignAfterOpenBracket: AlwaysBreak
5-
BinPackParameters: false
6-
AllowAllParametersOfDeclarationOnNextLine: true
7-
BreakBeforeBraces: Stroustrup
8-
SpaceAfterCStyleCast: true
9-
PointerAlignment: Left
10-
ForEachMacros: ['XNN_UNPREDICTABLE', 'XNN_LIKELY', 'XNN_UNLIKELY']
11-
IfMacros: ['IF']
12-
IndentCaseLabels: true
13-
ContinuationIndentWidth: 2
14-
SpaceBeforeParens: Custom
15-
SpaceBeforeParensOptions:
16-
AfterControlStatements: true
17-
AfterIfMacros: true
18-
AfterForeachMacros: false
19-
SpacesBeforeTrailingComments: 2
20-
IncludeBlocks: Regroup
21-
IncludeCategories:
22-
- Regex: '<xnnpack[./][[:alnum:].-]+>' # match XNNPack includes first
23-
Priority: 5
24-
- Regex: 'benchmark.h' # includes used in benchmarks
25-
Priority: 3
26-
- Regex: 'bench/' # includes used in benchmarks
27-
Priority: 3
28-
- Regex: 'gtest.h' # includes used in tests
29-
Priority: 3
30-
- Regex: 'gmock.h' # includes used in tests
31-
Priority: 3
32-
- Regex: '<[[:alnum:].]+>' # system headers
33-
Priority: 2 # lower priority to keep it sorted first before XNNPack includes
34-
MaxEmptyLinesToKeep: 2 # used to separate includes from functions
1+
BasedOnStyle: Google

.github/workflows/build.yml

+83-23
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ concurrency:
2020

2121
jobs:
2222
cmake-linux-x86_64:
23-
runs-on: ubuntu-22.04-8core
23+
runs-on: 'ubuntu-24.04-8core'
2424
timeout-minutes: 60
2525
steps:
2626
- uses: actions/checkout@v4
2727
- name: Update apt
28-
run: sudo apt update
28+
run: |
29+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
30+
sudo dpkg-reconfigure man-db
31+
sudo apt update
2932
- name: Install ninja
3033
run: sudo apt install ninja-build
3134
- name: Setup ccache
@@ -41,13 +44,17 @@ jobs:
4144
if: ${{ inputs.run-tests }}
4245
run: ctest --output-on-failure --parallel $(nproc)
4346
working-directory: ${{ github.workspace }}/build/local
47+
4448
cmake-linux-aarch64:
4549
runs-on: arm-ubuntu-arm-22.04-8core
4650
timeout-minutes: 60
4751
steps:
4852
- uses: actions/checkout@v4
4953
- name: Update apt
50-
run: sudo apt update
54+
run: |
55+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
56+
sudo dpkg-reconfigure man-db
57+
sudo apt update
5158
- name: Install ninja
5259
run: sudo apt install ninja-build
5360
- name: Setup ccache
@@ -63,13 +70,17 @@ jobs:
6370
if: ${{ inputs.run-tests }}
6471
run: ctest --output-on-failure --parallel $(nproc)
6572
working-directory: ${{ github.workspace }}/build/local
73+
6674
cmake-linux-armhf:
6775
runs-on: arm-ubuntu-arm-22.04-8core
6876
timeout-minutes: 60
6977
steps:
7078
- uses: actions/checkout@v4
7179
- name: Update apt
72-
run: sudo apt update
80+
run: |
81+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
82+
sudo dpkg-reconfigure man-db
83+
sudo apt update
7384
- name: Install ninja
7485
run: sudo apt install ninja-build
7586
- name: Install armhf cross-toolchain
@@ -91,13 +102,17 @@ jobs:
91102
LD_LIBRARY_PATH: /usr/arm-linux-gnueabihf/lib/:${{ env.LD_LIBRARY_PATH }}
92103
run: ctest --output-on-failure --parallel $(nproc)
93104
working-directory: ${{ github.workspace }}/build/linux/armhf
105+
94106
cmake-linux-riscv64:
95-
runs-on: ubuntu-22.04-16core
107+
runs-on: 'ubuntu-24.04-16core'
96108
timeout-minutes: 60
97109
steps:
98110
- uses: actions/checkout@v4
99111
- name: Update apt
100-
run: sudo apt update
112+
run: |
113+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
114+
sudo dpkg-reconfigure man-db
115+
sudo apt update
101116
- name: Install ninja
102117
run: sudo apt install ninja-build
103118
- name: Install riscv64 cross-toolchain
@@ -117,39 +132,62 @@ jobs:
117132
if: ${{ inputs.run-tests }}
118133
run: ctest --output-on-failure --parallel $(nproc)
119134
working-directory: ${{ github.workspace }}/build/linux/riscv64
135+
120136
cmake-linux-riscv64-rvv:
121-
runs-on: ubuntu-22.04-16core
137+
runs-on: 'ubuntu-24.04-16core'
122138
timeout-minutes: 60
123139
steps:
124140
- uses: actions/checkout@v4
125141
- name: Update apt
126-
run: sudo apt update
142+
run: |
143+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
144+
sudo dpkg-reconfigure man-db
145+
sudo apt update
127146
- name: Install ninja
128147
run: sudo apt install ninja-build
129148
- name: Download and Install riscv64 cross-toolchain tarball
130149
run: |
131-
wget -nv https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-glibc-ubuntu-22.04-llvm-nightly-2024.09.03-nightly.tar.gz
132-
tar xzf riscv64-glibc-ubuntu-22.04-llvm-nightly-2024.09.03-nightly.tar.gz
150+
wget -nv https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.01.20/riscv64-glibc-ubuntu-24.04-llvm-nightly-2025.01.20-nightly.tar.xz
151+
tar xJf riscv64-glibc-ubuntu-24.04-llvm-nightly-2025.01.20-nightly.tar.xz
133152
working-directory: ${{ github.workspace }}
134153
- name: Setup ccache
135154
uses: hendrikmuhs/[email protected]
136155
with:
137156
key: ${{ github.job }}
138157
max-size: "500M"
139158
save: ${{ inputs.update-caches }}
159+
- name: Check for cached qemu build
160+
id: cached-qemu
161+
uses: actions/cache@v4
162+
with:
163+
path: ${{ github.workspace }}/bin/qemu-riscv64
164+
key: ${{ runner.os }}-qemu-riscv64
165+
- name: Download and build qemu-riscv64
166+
if: steps.cached-qemu.outputs.cache-hit != 'true'
167+
run: |
168+
sudo apt install libglib2.0-dev
169+
mkdir bin
170+
wget -nv https://download.qemu.org/qemu-9.2.2.tar.xz
171+
tar xJf qemu-9.2.2.tar.xz
172+
cd qemu-9.2.2
173+
./configure --target-list=riscv64-linux-user --static
174+
make -j $(nproc)
175+
cp build/qemu-riscv64 ../bin/
176+
working-directory: ${{ github.workspace }}
140177
- name: Configure and build
141178
run: |
142179
scripts/build-linux-riscv64.sh \
143180
-DCMAKE_BUILD_TYPE=Release \
144181
-DXNNPACK_ENABLE_RISCV_VECTOR=ON \
145182
-DUSE_GNU_SOURCE=ON \
146183
-DRISCV_TOOLCHAIN_ROOT=${{ github.workspace }}/riscv/ \
147-
-DRISCV_QEMU_ROOT=${{ github.workspace }}/riscv/
184+
-DRISCV_QEMU_ROOT=${{ github.workspace }}
148185
working-directory: ${{ github.workspace }}
149186
- name: Run tests (no operator tests)
150187
if: ${{ inputs.run-tests }}
151-
run: ctest --output-on-failure -LE operator --parallel $(nproc)
188+
run: ctest --output-on-failure --label-exclude operator --parallel $(nproc)
152189
working-directory: ${{ github.workspace }}/build/linux/riscv64
190+
153191
cmake-windows-arm64:
154192
runs-on: windows-2022-32core
155193
timeout-minutes: 60
@@ -174,6 +212,7 @@ jobs:
174212
env:
175213
CFLAGS: "/UNDEBUG"
176214
CXXFLAGS: "/UNDEBUG"
215+
177216
cmake-windows-x64:
178217
runs-on: windows-2022-32core
179218
timeout-minutes: 60
@@ -202,6 +241,7 @@ jobs:
202241
if: ${{ inputs.run-tests }}
203242
run: ctest -C Release --output-on-failure --parallel $NUMBER_OF_PROCESSORS
204243
working-directory: ${{ github.workspace }}/build/windows/x64
244+
205245
cmake-windows-x86:
206246
runs-on: windows-2022-32core
207247
timeout-minutes: 60
@@ -230,6 +270,7 @@ jobs:
230270
if: ${{ inputs.run-tests }}
231271
run: ctest -C Release --output-on-failure --parallel $NUMBER_OF_PROCESSORS
232272
working-directory: ${{ github.workspace }}/build/windows/x86
273+
233274
cmake-macos-arm64:
234275
runs-on: macos-latest
235276
timeout-minutes: 60
@@ -262,16 +303,20 @@ jobs:
262303
build/macos/arm64 \
263304
-j$((2*$(sysctl -n hw.ncpu)))
264305
working-directory: ${{ github.workspace }}
306+
265307
cmake-android:
266308
strategy:
267309
matrix:
268310
arch: [arm64, armv7, x86]
269-
runs-on: ubuntu-22.04-8core
311+
runs-on: 'ubuntu-24.04-8core'
270312
timeout-minutes: 60
271313
steps:
272314
- uses: actions/checkout@v4
273315
- name: Update apt
274-
run: sudo apt update
316+
run: |
317+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
318+
sudo dpkg-reconfigure man-db
319+
sudo apt update
275320
- name: Install ninja
276321
run: sudo apt install ninja-build
277322
- name: Setup Android NDK
@@ -300,6 +345,7 @@ jobs:
300345
working-directory: ${{ github.workspace }}
301346
env:
302347
ANDROID_NDK: ${{ steps.setup-ndk.outputs.ndk-path }}
348+
303349
cmake-ios-arm64:
304350
runs-on: macos-latest
305351
timeout-minutes: 60
@@ -314,6 +360,7 @@ jobs:
314360
- name: Build with Xcode
315361
run: cmake --build build/ios/arm64 --parallel $(sysctl -n hw.ncpu) -- -quiet
316362
working-directory: ${{ github.workspace }}
363+
317364
cmake-ios-x86_64:
318365
runs-on: macos-latest
319366
timeout-minutes: 60
@@ -328,13 +375,17 @@ jobs:
328375
- name: Build with Xcode
329376
run: cmake --build build/ios/x86_64 --parallel $(sysctl -n hw.ncpu) -- -sdk iphonesimulator -quiet
330377
working-directory: ${{ github.workspace }}
378+
331379
bazel-linux-x86_64-clang-18:
332-
runs-on: ubuntu-22.04-8core
380+
runs-on: 'ubuntu-24.04-8core'
333381
timeout-minutes: 60
334382
steps:
335383
- uses: actions/checkout@v4
336384
- name: Update apt
337-
run: sudo apt update
385+
run: |
386+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
387+
sudo dpkg-reconfigure man-db
388+
sudo apt update
338389
- name: Install clang-18
339390
working-directory: ${{ github.workspace }}
340391
run: |
@@ -374,8 +425,9 @@ jobs:
374425
with:
375426
path: "/home/runner/.cache/bazel"
376427
key: ${{ github.job }}-${{ github.sha }}
428+
377429
bazel-linux-x86_64-gcc-9:
378-
runs-on: ubuntu-22.04-8core
430+
runs-on: 'ubuntu-24.04-8core'
379431
timeout-minutes: 60
380432
env:
381433
CC: gcc-9
@@ -384,7 +436,10 @@ jobs:
384436
steps:
385437
- uses: actions/checkout@v4
386438
- name: Update apt
387-
run: sudo apt update
439+
run: |
440+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
441+
sudo dpkg-reconfigure man-db
442+
sudo apt update
388443
- name: Install gcc-9
389444
working-directory: ${{ github.workspace }}
390445
run: |
@@ -416,13 +471,17 @@ jobs:
416471
with:
417472
path: "/home/runner/.cache/bazel"
418473
key: ${{ github.job }}-${{ github.sha }}
474+
419475
bazel-linux-aarch64-clang18:
420476
runs-on: arm-ubuntu-arm-22.04-4core
421477
timeout-minutes: 60
422478
steps:
423479
- uses: actions/checkout@v4
424480
- name: Update apt
425-
run: sudo apt update
481+
run: |
482+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
483+
sudo dpkg-reconfigure man-db
484+
sudo apt update
426485
- name: Install clang-18
427486
working-directory: ${{ github.workspace }}
428487
run: |
@@ -454,8 +513,8 @@ jobs:
454513
--test_output=all \
455514
--test_filter=*QP8* \
456515
test:qp8_f32_qc4w_gemm_minmax_test \
457-
test:fully_connected_nc_test \
458-
test:fully_connected_test
516+
test/operators:fully_connected_nc_test \
517+
test/subgraph:fully_connected_test
459518
working-directory: ${{ github.workspace }}
460519
- name: Compress disk cache
461520
# Bazel's `--disk-cache` currently grows without bounds, so we remove files
@@ -468,6 +527,7 @@ jobs:
468527
with:
469528
path: "/home/runner/.cache/bazel"
470529
key: ${{ github.job }}-${{ github.sha }}
530+
471531
bazel-linux-aarch64-gcc13:
472532
# This ensures we have solid test coverage for _Float16
473533
runs-on: arm-ubuntu-arm-22.04-4core
@@ -509,8 +569,8 @@ jobs:
509569
--test_output=all \
510570
--test_filter=*QP8* \
511571
test:qp8_f32_qc4w_gemm_minmax_test \
512-
test:fully_connected_nc_test \
513-
test:fully_connected_test
572+
test/operators:fully_connected_nc_test \
573+
test/subgraph:fully_connected_test
514574
working-directory: ${{ github.workspace }}
515575
- name: Compress disk cache
516576
# Bazel's `--disk-cache` currently grows without bounds, so we remove files

.github/workflows/sde-tests-linux-windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ jobs:
1616
strategy:
1717
matrix:
1818
arch: [windows-x86, windows-x64, linux-x86_64]
19-
sde-processor: [wsm, snb, ivb, hsw, bdw, skl, cnl, icl, skx, clx, cpx, icx, tgl, adl, mtl, rpl, spr, emr, gnr, gnr256, dmr, srf, arl, lnl, cwf, future]
19+
sde-processor: [slm, wsm, snb, ivb, hsw, bdw, skl, cnl, icl, skx, clx, cpx, icx, tgl, adl, mtl, rpl, spr, emr, gnr, gnr256, dmr, srf, arl, lnl, cwf]
2020
runs-on: ${{ matrix.arch == 'linux-x86_64' && 'ubuntu-latest' || 'windows-latest' }}
2121
needs: build
2222
continue-on-error: true
2323

2424
name: >
2525
(${{ matrix.arch }}, ${{ matrix.sde-processor }})
2626
- ${{ fromJson('{
27+
"slm": {"main": "Silvermont Processor - Supports SSE41"},
2728
"wsm": {"main": "Westmere Processor - Supports SSE41"},
2829
"snb": {"main": "Sandy Bridge Processor - Supports SSE41, AVX"},
2930
"ivb": {"main": "Ivy Bridge Processor - Supports SSE41, AVX, F16C"},
@@ -48,8 +49,7 @@ jobs:
4849
"srf": {"main": "Sierra Forest Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVXVNNI, AVXVNNIINT8"},
4950
"arl": {"main": "Arrow Lake Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVXVNNI, AVXVNNIINT8"},
5051
"lnl": {"main": "Lunar Lake Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVXVNNI, AVXVNNIINT8"},
51-
"cwf": {"main": "Clearwater Forest Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVXVNNI, AVXVNNIINT8"},
52-
"future": {"main": "Future Chip Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVX512F, AVX512FP16, AVX512SKX, AVX256SKX, AVX512VBMI, AVX512VNNI, AVX512VNNIGFNI, AVX256VNNI, AVX256VNNIGFNI, AVX512BF16, AVXVNNI, AVXVNNIINT8"}
52+
"cwf": {"main": "Clearwater Forest Processor - Supports SSE41, AVX, F16C, FMA3, AVX2, AVXVNNI, AVXVNNIINT8"}
5353
}')[matrix.sde-processor].main }}
5454
5555
steps:

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ ehthumbs.db
3434
Thumbs.db
3535
*.swp
3636
.vscode
37+
.vs

0 commit comments

Comments
 (0)