Fixed API compatibility on maxpool2d (with indices, empty args) functions #613
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
name: Test | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
arch: [ x86_64 ] | |
python_version: [ "3.11" ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Ccache for C++ compilation | |
uses: hendrikmuhs/ccache-action@621a41397ed83711c72862638d9ff6e63fca3041 # v1.2.3 | |
with: | |
key: ${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python_version }} | |
# LLVM needs serious cache size | |
max-size: 6G | |
- name: Install linker | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y lld | |
- name: Install | |
env: | |
CMAKE_EXE_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld" | |
CMAKE_STATIC_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld" | |
CMAKE_SHARED_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld" | |
CMAKE_MODULE_LINKER_FLAGS_INIT: "-fuse-ld=ld.lld" | |
run: | | |
pip install -r requirements.txt | |
pip install . -v | |
- name: Unit tests | |
run: | | |
PYTHONPATH=tests pytest tests/unit | |
- name: Test vs. torch-mlir test-suite | |
run: | | |
pip install -r tests/torch_mlir/torch-mlir-requirements.txt | |
PYTHONPATH=tests/torch_mlir python tests/torch_mlir/main.py |