Add a CI builder with latest pytorch CPU nightly. Also add AArch64 to the build (#166)

pull/168/head
powderluv 2021-02-21 13:36:06 -08:00 committed by GitHub
parent 1b769f7841
commit cecf1fbba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -18,6 +18,9 @@ jobs:
- name: Install python depends - name: Install python depends
run: | run: |
python3 -m pip install pytest pybind11 numpy python3 -m pip install pytest pybind11 numpy
- name: Install pytorch_nightly depends
run: |
python3 -m pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- name: Get LLVM Hash - name: Get LLVM Hash
id: get-llvm-hash id: get-llvm-hash
run: echo "::set-output name=hash::$(git submodule status)" run: echo "::set-output name=hash::$(git submodule status)"
@ -50,6 +53,9 @@ jobs:
- name: Install python depends - name: Install python depends
run: | run: |
python3 -m pip install pytest pybind11 numpy python3 -m pip install pytest pybind11 numpy
- name: Install pytorch_nightly depends
run: |
python3 -m pip install --pre torch torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
- name: Get LLVM Hash - name: Get LLVM Hash
id: get-llvm-hash id: get-llvm-hash
run: echo "::set-output name=hash::$(git submodule status)" run: echo "::set-output name=hash::$(git submodule status)"
@ -73,10 +79,10 @@ jobs:
mkdir build_assert mkdir build_assert
cd build_assert cd build_assert
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON -DMLIR_DIR=../${LLVM}/install/lib/cmake/mlir/ -DLLVM_DIR=../${LLVM}/install/lib/cmake/llvm/ -DCMAKE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DLLVM_EXTERNAL_LIT=`pwd`/../${LLVM}/build/bin/llvm-lit cmake .. -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON -DMLIR_DIR=../${LLVM}/install/lib/cmake/mlir/ -DLLVM_DIR=../${LLVM}/install/lib/cmake/llvm/ -DCMAKE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DLLVM_EXTERNAL_LIT=`pwd`/../${LLVM}/build/bin/llvm-lit
make check-npcomp -j$(nproc) make check-npcomp check-frontends-pytorch -j$(nproc)
- name: Build and Test npcomp (Release) - name: Build and Test npcomp (Release)
run: | run: |
mkdir build_release mkdir build_release
cd build_release cd build_release
cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DMLIR_DIR=../${LLVM}/install/lib/cmake/mlir/ -DLLVM_DIR=../${LLVM}/install/lib/cmake/llvm/ -DCMAKE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DLLVM_EXTERNAL_LIT=`pwd`/../${LLVM}/build/bin/llvm-lit cmake .. -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DMLIR_DIR=../${LLVM}/install/lib/cmake/mlir/ -DLLVM_DIR=../${LLVM}/install/lib/cmake/llvm/ -DCMAKE_LINKER=lld -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DPYTHON_EXECUTABLE=/usr/bin/python3 -DLLVM_EXTERNAL_LIT=`pwd`/../${LLVM}/build/bin/llvm-lit
make check-npcomp -j$(nproc) make check-npcomp check-frontends-pytorch -j$(nproc)

View File

@ -69,7 +69,7 @@ cmake -GNinja \
-DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_UTILS=ON \ -DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_PROJECTS=mlir \ -DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD="X86" \ -DLLVM_TARGETS_TO_BUILD="X86;AArch64" \
-DLLVM_INCLUDE_TOOLS=ON \ -DLLVM_INCLUDE_TOOLS=ON \
"-DCMAKE_INSTALL_PREFIX=$install_mlir" \ "-DCMAKE_INSTALL_PREFIX=$install_mlir" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \