Skip to content

[converter] expand strides for conv ops #949

[converter] expand strides for conv ops

[converter] expand strides for conv ops #949

Workflow file for this run

name: Unit tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
unit-test:
name: Unit tests for ${{ matrix.os }}, PyTorch ${{ matrix.vers.pt_ver }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
vers: [ {pt_ver: "1.6.0", tv_ver: "0.7.0"}, {pt_ver: "latest", tv_ver: "latest"} ]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.8
- name: Install PyTorch
env:
PYTORCH_VER: ${{ matrix.vers.pt_ver }}
TORCHVISION_VER: ${{ matrix.vers.tv_ver }}
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision -c pytorch
elif [[ "$TORCHVISION_VER" == "0.9."* || "$TORCHVISION_VER" == "0.10."* ]]; then
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER pillow=6 -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER -c pytorch
fi
elif [ "$RUNNER_OS" == "Windows" ]; then
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision cpuonly pillow=6 -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER cpuonly pillow=6 -c pytorch
fi
else
if [[ "$TORCHVISION_VER" == "latest" && "$PYTORCH_VER" == "latest" ]]; then
conda install pytorch torchvision cpuonly -c pytorch
else
conda install pytorch=$PYTORCH_VER torchvision=$TORCHVISION_VER cpuonly -c pytorch
fi
fi
- name: Install TinyNeuralNetwork
run: python setup.py install
- name: Install test dependencies
run: pip install black flake8 tensorflow scipy interval
- name: Lint checks
run: python -m flake8
- name: Style checks
run: python -m black .
- name: Run unit tests
run: |
cd tests
python converter_op_test.py -v
python converter_optimizer_test.py -v
python quantizer_test.py -v
python modifier_prune_test.py -v
python modifier_test.py -v
- name: Run integration tests
run: |
source activate.sh
cd tests
rm -rf out || true
python converter_test.py -v -k mobilenet
if [ "$RUNNER_OS" != "Windows" ]; then
rm -rf out || true
python converter_qat_test.py -v -k mobilenet
fi
rm -rf out || true
python tracer_test.py -v -k mobilenet