Xetile generator #1
Workflow file for this run
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: GPU Build and run tests on FS simulator | |
on: | |
pull_request: | |
branches: | |
- main | |
- upstream | |
- 'dist-ndarray' | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
if: github.repository == 'intel-innersource/frameworks.ai.mlir.mlir-extensions' | |
runs-on: [self-hosted, fs-sim, glados] | |
timeout-minutes: 450 | |
env: | |
TBB_VER: 2021.6.0 | |
LEVEL_ZERO_VER: v1.8.1 | |
TBB_URL_PREFIX: https://github.com/oneapi-src/oneTBB/releases/download/ | |
LLVM_SHA_FILE: llvm_version.txt | |
steps: | |
- name: Check build root | |
run: | | |
export BUILD_ROOT=$(pwd)/build_gpu | |
echo BUILD_ROOT=${BUILD_ROOT} >> $GITHUB_ENV | |
export HOME_DIR=${BUILD_ROOT}/home | |
echo HOME_DIR=${HOME_DIR} >> $GITHUB_ENV | |
if [ ! -d "$BUILD_ROOT" ]; then mkdir -p $BUILD_ROOT; fi | |
- name: Clear home dir | |
run: | | |
mkdir -p $HOME_DIR | |
cd $HOME_DIR | |
rm -rf * | |
- uses: actions/checkout@v3 | |
with: | |
repository: intel-innersource/frameworks.ai.mlir.mlir-extensions | |
token: ${{ secrets.WORKFLOW_TOKEN }} | |
fetch-depth: 0 | |
path: ${{ env.HOME_DIR }}/frameworks.ai.mlir.mlir-extensions | |
- name: Setup Level Zero | |
shell: bash -l {0} | |
run: | | |
cd $HOME_DIR | |
git clone https://github.com/oneapi-src/level-zero.git | |
cd level-zero | |
git checkout $LEVEL_ZERO_VER | |
cmake -S . -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../level-zero-install | |
cmake --build build --target install | |
- name: Checkout MLIR | |
run: | | |
cd $BUILD_ROOT | |
if [ ! -d "llvm-project" ]; then git clone https://github.com/llvm/llvm-project; fi | |
cd $BUILD_ROOT/llvm-project | |
git reset --hard HEAD | |
export LLVM_SHA=`cat $HOME_DIR/frameworks.ai.mlir.mlir-extensions/build_tools/llvm_version.txt` | |
git fetch --prune | |
git checkout $LLVM_SHA || exit 1 | |
if [ -d "$HOME_DIR/frameworks.ai.mlir.mlir-extensions/build_tools/patches" ]; then git apply $HOME_DIR/frameworks.ai.mlir.mlir-extensions/build_tools/patches/*.patch; fi | |
- name: Setup IMEX and run tests on FS simulator | |
shell: bash -l {0} | |
run: | | |
source /opt/intel/oneapi/setvars.sh | |
set -x | |
cd $HOME_DIR/frameworks.ai.mlir.mlir-extensions | |
cmake -S $BUILD_ROOT/llvm-project/llvm -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_USE_LINKER=gold -DLLVM_ENABLE_ZSTD=OFF -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLEVEL_ZERO_DIR=$HOME_DIR/level-zero-install/ -DLLVM_LIT_ARGS="-a -j 1 --debug --timeout=600 --filter=gemm_with_transposed_B_1kx1kx1k_f16_f16_f32.mlir" -DIMEX_ENABLE_FS_SIMULATOR=ON || exit | |
sed -e 's,-printAllFeatures,,g' -i ${WORK_ROOT}/fs/scripts/run_in_a_loop_rasty.sh | |
(cd ${WORK_ROOT}/fs/scripts && source setup.sh && umd_driver_env_variables_export && ./run_in_a_loop_rasty.sh) &> fs-sim.log & | |
SIM_PID=$! | |
cmake --build build --target check-static | tee build/tests.txt | |
TEST_RESULT=${PIPESTATUS[0]} | |
kill $SIM_PID | |
wait $SIM_PID | |
cd ${WORK_ROOT}/fs/scripts | |
zip -qr9 /tmp/fs-sim-tbx-logs.zip tbx*.log | |
exit $TEST_RESULT | |
- name: Upload tests.txt | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tests_gpu-fs-sim.txt | |
path: ${{ env.HOME_DIR }}/frameworks.ai.mlir.mlir-extensions/build/tests.txt | |
- name: Upload fs-sim.log | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fs-sim.log | |
path: ${{ env.HOME_DIR }}/frameworks.ai.mlir.mlir-extensions/fs-sim.log | |
- name: Upload fs-sim-tbx-logs.zip | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: fs-sim-tbx-logs.zip | |
path: /tmp/fs-sim-tbx-logs.zip |