Update buildAndTest.yml

pull/332/head
Sean Silva 2021-09-27 21:07:24 +00:00
parent 4fad753073
commit e687d39074
1 changed files with 10 additions and 41 deletions

View File

@ -11,7 +11,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Get npcomp
- name: Get torch-mlir
uses: actions/checkout@v2
with:
submodules: 'true'
@ -31,57 +31,26 @@ jobs:
uses: hendrikmuhs/ccache-action@4687d037e4d7cf725512d9b819137a3af34d39b3
with:
key: ${{ runner.os }}-clangreleaseasserts-${{ steps.get-submodule-hash.outputs.hash }}
- name: Build and Test npcomp (Assert)
- name: Build and Test torch-mlir (Assert)
run: |
cd $GITHUB_WORKSPACE
mkdir build
cd build
cmake .. -GNinja \
cmake $GITHUB_WORKSPACE/external/llvm-project/llvm -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_LINKER=lld \
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DPython3_EXECUTABLE=$(which python) \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_EXTERNAL_PROJECTS=torch-mlir \
-DLLVM_EXTERNAL_TORCH_MLIR_SOURCE_DIR="$GITHUB_WORKSPACE" \
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DLLVM_TARGETS_TO_BUILD=host
ninja check-npcomp-all
- name: Refbackend integration tests
ninja check-torch-mlir-all
- name: RefBackend integration tests
run: |
cd $GITHUB_WORKSPACE
export PYTHONPATH="$GITHUB_WORKSPACE/build/python_packages/npcomp_core:$GITHUB_WORKSPACE/build/python_packages/torch_mlir"
export PYTHONPATH="$GITHUB_WORKSPACE/build/tools/torch-mlir/python_packages/torch_mlir"
python -m e2e_testing.torchscript.main --config=refbackend -v
# build_wheels:
# name: Build Wheels and Smoketest
# runs-on: ubuntu-20.04
# steps:
# - name: Set up Python
# uses: actions/setup-python@v2
# with:
# python-version: 3.9
# - name: Get npcomp
# uses: actions/checkout@v2
# with:
# submodules: 'true'
# - name: Install python dependencies
# run: |
# python -m pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
# python -m pip install wheel
# - name: Install Ninja
# uses: llvm/actions/install-ninja@55d844821959226fab4911f96f37071c1d4c3268
# - name: Get Submodule Hash
# id: get-submodule-hash
# run: echo "::set-output name=hash::$(md5sum $(git submodule status))"
# shell: bash
# - name: Ccache for C++ compilation
# uses: hendrikmuhs/ccache-action@4687d037e4d7cf725512d9b819137a3af34d39b3
# with:
# key: ${{ runner.os }}-wheel-${{ steps.get-submodule-hash.outputs.hash }}
# - name: Build wheels
# run: |
# cd $GITHUB_WORKSPACE
# ./build_tools/build_python_wheels.sh
# - uses: actions/upload-artifact@v2
# with:
# name: ubuntu-20.04-wheels
# path: wheelhouse/