Skip to content
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

ci test-coverage #4305

Merged
merged 46 commits into from
Nov 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1c83fe9
ci test-coverage
nihui Oct 26, 2022
866665f
update ref
nihui Oct 26, 2022
0fa0498
fix pulltype
nihui Oct 26, 2022
fbbf0ca
install libvulkan-dev
nihui Oct 26, 2022
496b393
use cache
nihui Oct 26, 2022
fae37be
fix cache version
nihui Oct 26, 2022
df19124
limit threads
nihui Oct 26, 2022
1b479af
use debian source
nihui Oct 26, 2022
d9cc996
one job, upload codecov
nihui Oct 26, 2022
bfc5ef2
limit lp threads
nihui Oct 26, 2022
d58e4ce
fix
nihui Oct 26, 2022
97c11de
more jobs
nihui Oct 26, 2022
af0a3f4
fix
nihui Oct 26, 2022
bcd9f35
more jobs
nihui Oct 26, 2022
5e4e03a
install
nihui Oct 26, 2022
cfce41d
debug
nihui Oct 26, 2022
3666425
debug
nihui Oct 26, 2022
a81addf
debug
nihui Oct 26, 2022
ed9fc50
debug
nihui Oct 26, 2022
d8b4b81
debug
nihui Oct 27, 2022
862f8a4
update qemu
nihui Oct 27, 2022
b29304f
revert qemu for riscv
nihui Oct 27, 2022
09cb65b
play matrix
nihui Oct 27, 2022
62b7d44
try
nihui Oct 27, 2022
f108184
second try
nihui Oct 27, 2022
a41035a
ooops
nihui Oct 27, 2022
a73970c
update qemu for riscv
nihui Oct 28, 2022
52081cb
set to known working riscv-gcc rvv-next commit id
nihui Oct 28, 2022
38ba315
update to known working gcc
nihui Oct 29, 2022
8b85bef
Update test-coverage.yml
nihui Oct 29, 2022
662d166
Update test-coverage.yml
nihui Oct 30, 2022
ca797b0
Update test-coverage.yml
nihui Oct 31, 2022
d21b614
set codecov branch
nihui Oct 31, 2022
117325d
set sha
nihui Oct 31, 2022
630b61c
pnnx ci
nihui Nov 1, 2022
c87bd34
install pip
nihui Nov 1, 2022
e22917c
cachekey
nihui Nov 1, 2022
7aa53ae
fix
nihui Nov 1, 2022
5178a46
Merge branch 'Tencent:master' into tencent-ci-coverage
nihui Nov 1, 2022
e53a210
update
nihui Nov 1, 2022
4f2eb20
pip3 upgrade
nihui Nov 1, 2022
e823028
override system
nihui Nov 1, 2022
1d63d93
install distribute
nihui Nov 1, 2022
b215593
fix
nihui Nov 1, 2022
f1156b4
fix
nihui Nov 1, 2022
3e6601d
fix
nihui Nov 1, 2022
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
47 changes: 18 additions & 29 deletions .ci/linux-x64-cpu-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,20 @@ on:
- '!tools/pnnx/**'
- 'examples/**'
concurrency:
group: linux-x64-cpu-gcc-${{ ci.base_ref }}
group: linux-x64-cpu-gcc-${{ ci.head_ref }}

jobs:
linux-gcc:
name: linux-gcc
strategy:
matrix:
include:
- { SSE2: 'OFF', AVX: 'OFF', AVX2: 'OFF', AVX512: 'OFF' }
- { SSE2: 'ON', AVX: 'OFF', AVX2: 'OFF', AVX512: 'OFF' }
- { SSE2: 'ON', AVX: 'ON', AVX2: 'OFF', AVX512: 'OFF' }
- { SSE2: 'ON', AVX: 'ON', AVX2: 'ON', AVX512: 'OFF' }
- { SSE2: 'ON', AVX: 'ON', AVX2: 'ON', AVX512: 'ON' }

runs-on:
pool-name: docker
container:
Expand All @@ -46,43 +56,22 @@ jobs:
apt-get update
apt-get install -y libprotobuf-dev protobuf-compiler libopencv-dev

- name: build-sse2
run: |
mkdir build-sse2 && cd build-sse2
cmake -DNCNN_AVX=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-sse2
run: cd build-sse2 && ctest --output-on-failure -j $(nproc)
- name: build-avx
run: |
mkdir build-avx && cd build-avx
cmake -DNCNN_AVX2=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx
run: cd build-avx && ctest --output-on-failure -j $(nproc)
- name: build-avx2
run: |
mkdir build-avx2 && cd build-avx2
cmake -DNCNN_AVX512=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx2
run: cd build-avx2 && ctest --output-on-failure -j $(nproc)
- name: build-avx512
- name: build
run: |
mkdir build-avx512 && cd build-avx512
cmake -DNCNN_BUILD_TESTS=ON ..
mkdir build && cd build
cmake -DNCNN_SSE2=${{matrix.SSE2}} -DNCNN_AVX=${{matrix.AVX}} -DNCNN_AVX2=${{matrix.AVX2}} -DNCNN_AVX512=${{matrix.AVX512}} -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-avx512
run: cd build-avx512 && ctest --output-on-failure -j $(nproc)
- name: test
run: cd build && ctest --output-on-failure -j $(nproc)
- name: build-shared
run: |
mkdir build-shared && cd build-shared
cmake -DNCNN_SHARED_LIB=ON ..
cmake -DNCNN_SSE2=${{matrix.SSE2}} -DNCNN_AVX=${{matrix.AVX}} -DNCNN_AVX2=${{matrix.AVX2}} -DNCNN_AVX512=${{matrix.AVX512}} -DNCNN_SHARED_LIB=ON ..
cmake --build . -j $(nproc)
- name: build-noint8
run: |
mkdir build-noint8 && cd build-noint8
cmake -DNCNN_INT8=OFF -DNCNN_BUILD_TESTS=ON ..
cmake -DNCNN_SSE2=${{matrix.SSE2}} -DNCNN_AVX=${{matrix.AVX}} -DNCNN_AVX2=${{matrix.AVX2}} -DNCNN_AVX512=${{matrix.AVX512}} -DNCNN_INT8=OFF -DNCNN_BUILD_TESTS=ON ..
cmake --build . -j $(nproc)
- name: test-noint8
run: cd build-noint8 && ctest --output-on-failure -j $(nproc)
Expand Down
121 changes: 121 additions & 0 deletions .ci/pnnx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: pnnx
on:
push:
branches: [master]
paths:
- '.ci/pnnx.yml'
- 'tools/pnnx/**'
- '!tools/pnnx/README.md'
mr:
target-branches: [master]
paths:
- '.ci/pnnx.yml'
- 'tools/pnnx/**'
- '!tools/pnnx/README.md'
concurrency:
group: pnnx-${{ ci.head_ref }}

jobs:
ubuntu:
strategy:
matrix:
include:
- torch-version: 1.8.1
torchvision-version: 0.9.1
torchvision-cache-key: '0_9_1'

- torch-version: 1.9.1
torchvision-version: 0.10.1
torchvision-cache-key: '0_10_1'

- torch-version: 1.10.0
torchvision-version: 0.11.1
torchvision-cache-key: '0_11_1'

- torch-version: 1.11.0
torchvision-version: 0.12.0
torchvision-cache-key: '0_12_0'

- torch-version: 1.12.0
torchvision-version: 0.13.0
torchvision-cache-key: '0_13_0'

- torch-version: 1.13.0
torchvision-version: 0.14.0
torchvision-cache-key: '0_14_0'

runs-on:
pool-name: docker
container:
image: bkci/ci:ubuntu
steps:
- name: checkout
checkout: self
with:
enableGitLfs: false

- name: install-deps
run: |
apt-get update
apt-get install -y python3-pip
python3 -m pip install --upgrade pip
pip3 uninstall -y setuptools
pip3 install -U pytest setuptools wheel twine distribute requests

- name: setup pytorch
run: |
export PYTHONUSERBASE=${{ci.workspace}}/torch-${{matrix.torch-version}}
pip3 install --user torch==${{matrix.torch-version}}+cpu torchvision==${{matrix.torchvision-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html

- name: cache-torchvision
id: cache-torchvision
uses: cache@1.*
with:
cachePaths: torchvision-${{matrix.torchvision-version}}-install
cacheKey: torchvision-${{matrix.torchvision-cache-key}}-linux-install-20211228
- name: checkout-torchvision
if: steps.cache-torchvision.outputs.cacheHit != 'true'
checkout: https://github.com/pytorch/vision.git
with:
pullType: TAG
refName: v${{matrix.torchvision-version}}
localPath: vision
enableSubmodule: false
enableGitLfs: false
- name: torchvision
if: steps.cache-torchvision.outputs.cacheHit != 'true'
run: |
apt-get update
apt-get install -y libjpeg-dev libpng-dev
cd vision
mkdir -p build; cd build
cmake -DCMAKE_INSTALL_PREFIX=${{ci.workspace}}/torchvision-${{matrix.torchvision-version}}-install -DTorch_DIR=${{ci.workspace}}/torch-${{matrix.torch-version}}/lib/python3.9/site-packages/torch/share/cmake/Torch -DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j $(nproc)
cmake --build . --target install

- name: build-ncnn
run: |
export PYTHONUSERBASE=${{ci.workspace}}/torch-${{matrix.torch-version}}
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DNCNN_PYTHON=ON -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF ..
cmake --build . -j $(nproc)
cd ..
export CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)
pip3 install --user .

- name: build-pnnx
run: |
export PYTHONUSERBASE=${{ci.workspace}}/torch-${{matrix.torch-version}}
cd tools/pnnx
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release -DTorchVision_INSTALL_DIR=${{ci.workspace}}/torchvision-${{matrix.torchvision-version}}-install ..
cmake --build . -j $(nproc)

- name: test
run: |
export PYTHONUSERBASE=${{ci.workspace}}/torch-${{matrix.torch-version}}
export OMP_NUM_THREADS=1
export MKL_NUM_THREADS=1
export MKL_ENABLE_INSTRUCTIONS=SSE4_2
cd tools/pnnx
cd build && ctest --output-on-failure -j $(nproc)
Loading