mmdeploy/.github/workflows/quantize.yml

67 lines
1.8 KiB
YAML

name: quantize
on:
push:
paths-ignore:
- "demo/**"
- "tools/**"
pull_request:
paths-ignore:
- "demo/**"
- "tools/**"
- "docs/**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test_ncnn_PTQ:
runs-on: ubuntu-20.04
container:
image: pytorch/pytorch:1.8.0-cuda11.1-cudnn8-devel
strategy:
matrix:
python-version: [3.7]
torch: [1.8.0+cu111]
mmcv: [1.4.2]
include:
- torch: 1.8.0+cu111
torch_version: torch1.8
torchvision: 0.9.0+cu111
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
run: |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
apt-get update && apt-get install -y git wget
- name: Install dependencies
run: |
python -V
python -m pip install -U pip
python -m pip install mmcv-full==${{matrix.mmcv}} -f https://download.openmmlab.com/mmcv/dist/cu111/${{matrix.torch_version}}/index.html
python -m pip install -r requirements.txt
python -m pip install rapidfuzz==2.15.1
- name: Install mmcls
run: |
cd ~
git clone -b v0.23.0 --depth 1 https://github.com/open-mmlab/mmclassification.git
cd mmclassification
python3 -m pip install -e .
- name: Install ppq
run: |
git clone -b v0.6.6 --depth 1 https://github.com/openppl-public/ppq
cd ppq
python3 -m pip install -r requirements.txt
python3 setup.py install
- name: Run tests
run: |
export PYTHONPATH=${PWD}/ppq:${PYTHONPATH}
python3 .github/scripts/quantize_to_ncnn.py