-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86 sse2/xop/avx/avx2/avx512/vnni/vnniint8 optimization for gemm int8 (…
…#5763) * skip round problem * sde on ubuntu24
- Loading branch information
Showing
20 changed files
with
18,053 additions
and
1,484 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: linux-x64-sde | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- '.github/workflows/linux-x64-sde.yml' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'src/*' | ||
- 'src/layer/*' | ||
- 'src/layer/x86/**' | ||
- 'tests/**' | ||
- 'tools/**' | ||
- '!tools/pnnx/**' | ||
- 'examples/**' | ||
pull_request: | ||
branches: [master] | ||
paths: | ||
- '.github/workflows/linux-x64-sde.yml' | ||
- 'CMakeLists.txt' | ||
- 'cmake/**' | ||
- 'src/*' | ||
- 'src/layer/*' | ||
- 'src/layer/x86/**' | ||
- 'tests/**' | ||
- 'tools/**' | ||
- '!tools/pnnx/**' | ||
- 'examples/**' | ||
concurrency: | ||
group: linux-x64-sde-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
gcc-sde: | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: update | ||
run: sudo apt-get update | ||
- name: gcc14 | ||
run: sudo apt-get install gcc-14 g++-14 | ||
- name: Setup SDE binaries | ||
uses: petarpetrovt/[email protected] | ||
- name: build | ||
env: | ||
CC: gcc-14 | ||
CXX: g++-14 | ||
run: | | ||
mkdir build && cd build | ||
cmake -DNCNN_BUILD_TESTS=ON .. | ||
cmake --build . -j $(nproc) | ||
- name: test-p4p | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-p4p;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-snb | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-snb;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-hsw | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-hsw;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-adl | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-adl;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-arl | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-arl;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-skx | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-skx;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-spr | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-spr;--" ctest --output-on-failure -j $(nproc) | ||
- name: test-gnr | ||
run: | | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-gnr;--" ctest --output-on-failure -j $(nproc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
LD_LIBRARY_PATH: /data/action/install/lib64 | ||
run: | | ||
mkdir build && cd build | ||
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_VULKAN=ON -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_XOP=OFF -DNCNN_AVXVNNI=OFF -DNCNN_AVX512=ON -DNCNN_AVX512VNNI=ON -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. | ||
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_VULKAN=ON -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_XOP=OFF -DNCNN_AVXVNNI=OFF -DNCNN_AVXNECONVERT=OFF -DNCNN_AVX512=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. | ||
cmake --build . -j 4 | ||
- name: test | ||
env: | ||
|
@@ -54,61 +54,72 @@ jobs: | |
lcov --list lcov.info | ||
- name: codecov | ||
id: codecov | ||
continue-on-error: true | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
disable_search: true | ||
plugins: noop | ||
files: build/lcov.info | ||
- name: set the status | ||
if: always() | ||
run: | | ||
if ${{ steps.codecov.outcome=='success' }}; then | ||
echo fine | ||
else | ||
exit 1 | ||
fi | ||
|
||
linux-gcc-x64-avx512-spr: | ||
runs-on: ubuntu-22.04 | ||
linux-gcc-x64-sde: | ||
name: linux-gcc-sde-${{ matrix.cpu }} | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- { cpu: hsw, AVX2: ON, AVXVNNI: OFF, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF } | ||
- { cpu: adl, AVX2: ON, AVXVNNI: ON, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF } | ||
- { cpu: arl, AVX2: ON, AVXVNNI: ON, AVXVNNIINT8: ON, AVXNECONVERT: ON, AVX512: OFF, AVX512VNNI: OFF, AVX512BF16: OFF, AVX512FP16: OFF } | ||
- { cpu: spr, AVX2: ON, AVXVNNI: OFF, AVXVNNIINT8: OFF, AVXNECONVERT: OFF, AVX512: ON, AVX512VNNI: ON, AVX512BF16: ON, AVX512FP16: ON } | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: update | ||
run: sudo apt-get update | ||
- name: gcc12 | ||
run: sudo apt-get install gcc-12 g++-12 | ||
- name: gcc14 | ||
run: sudo apt-get install gcc-14 g++-14 | ||
- name: lcov | ||
run: sudo apt-get install lcov | ||
- name: Setup SDE binaries | ||
uses: petarpetrovt/[email protected] | ||
- name: build-avx512-spr | ||
- name: build | ||
env: | ||
CC: gcc-12 | ||
CXX: g++-12 | ||
CC: gcc-14 | ||
CXX: g++-14 | ||
run: | | ||
mkdir build-avx512-spr && cd build-avx512-spr | ||
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_AVX2=ON -DNCNN_AVX512=ON -DNCNN_AVX512VNNI=ON -DNCNN_AVX512BF16=ON -DNCNN_AVX512FP16=ON -DNCNN_XOP=OFF -DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. | ||
cmake --build . -j 2 | ||
- name: test-avx512-spr | ||
mkdir build && cd build | ||
cmake -DCMAKE_BUILD_TYPE=debug -DNCNN_COVERAGE=ON -DNCNN_RUNTIME_CPU=OFF \ | ||
-DNCNN_AVX=ON \ | ||
-DNCNN_F16C=ON \ | ||
-DNCNN_XOP=OFF \ | ||
-DNCNN_AVX2=${{ matrix.AVX2 }} \ | ||
-DNCNN_AVXVNNI=${{ matrix.AVXVNNI }} \ | ||
-DNCNN_AVXVNNIINT8=${{ matrix.AVXVNNIINT8 }} \ | ||
-DNCNN_AVXNECONVERT=${{ matrix.AVXNECONVERT }} \ | ||
-DNCNN_AVX512=${{ matrix.AVX512 }} \ | ||
-DNCNN_AVX512VNNI=${{ matrix.AVX512VNNI }} \ | ||
-DNCNN_AVX512BF16=${{ matrix.AVX512BF16 }} \ | ||
-DNCNN_AVX512FP16=${{ matrix.AVX512FP16 }} \ | ||
-DNCNN_OPENMP=OFF -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON .. | ||
cmake --build . -j $(nproc) | ||
- name: test | ||
run: | | ||
cd build-avx512-spr | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-spr;--" ctest --output-on-failure -j 2 | ||
cd build | ||
TESTS_EXECUTABLE_LOADER=$SDE_PATH/sde64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-${{ matrix.cpu }};--" ctest --output-on-failure -j $(nproc) | ||
- name: lcov-collect | ||
run: | | ||
cd build-avx512-spr | ||
lcov --gcov-tool gcov-12 -d ./src -c -o lcov.info | ||
cd build | ||
lcov --gcov-tool gcov-14 -d ./src -c -o lcov.info | ||
lcov -r lcov.info '/usr/*' -o lcov.info | ||
lcov -r lcov.info '*/build-avx512-spr/*' -o lcov.info | ||
lcov -r lcov.info '*/build/*' -o lcov.info | ||
lcov --list lcov.info | ||
- name: codecov-avx512-spr | ||
- name: codecov | ||
uses: codecov/codecov-action@v5 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
disable_search: true | ||
plugins: noop | ||
files: build-avx512-spr/lcov.info | ||
files: build/lcov.info | ||
|
||
linux-gcc-riscv64-rvv: | ||
strategy: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.