diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml deleted file mode 100644 index f1f83cb61..000000000 --- a/.github/workflows/basic.yml +++ /dev/null @@ -1,56 +0,0 @@ -# This is an example of jobs, environments, secrets being used. -# We keep it disabled, but in the repo as a reference. -name: Basic TPP-MLIR Builder - -# For now, we do it manually, but this will need to be on commit -on: - workflow_dispatch: - -env: - # clang, gcc - CC: clang - CXX: clang++ - # ld, gold, lld - LD: lld - # Release, Debug, RelWithDebInfo - BUILD: RelWithDebInfo - # "Address;Memory;Leak;Undefined" - SAN: "" - # ON, OFF - OPENMP: OFF - ONEDNN: OFF - -jobs: - build_tpp_mlir: - runs-on: self-hosted - - steps: - - uses: actions/checkout@v3 - - - name: LLVM commit - run: | - echo "LLVM_DIR=${{ secrets.LLVM_ROOT }}/$(cat build_tools/llvm_version.txt)" >> $GITHUB_ENV - - - name: Install Python Requirements - run: | - pip install --upgrade --user lit - echo "LLVM_LIT=$HOME/.local/bin/lit" >> $GITHUB_ENV - - - name: CMake - run: | - mkdir -p build - cmake -G Ninja -B build . \ - -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_BUILD_TYPE=${BUILD} \ - -DMLIR_DIR=${{ env.LLVM_DIR }}/lib/cmake/mlir \ - -DLLVM_EXTERNAL_LIT=${{ env.LLVM_LIT }} \ - -DLLVM_USE_LINKER=${LD} \ - -DUSE_SANITIZER=${SAN} \ - -DUSE_OpenMP=${OPENMP} \ - -DUSE_OneDNN=${ONEDNN} - - - name: Build - run: ninja -C build all - - - name: Test - run: ninja -C build check-all diff --git a/.github/workflows/tpp-benchmark.yml b/.github/workflows/tpp-benchmark.yml index 653745170..f6c44f944 100644 --- a/.github/workflows/tpp-benchmark.yml +++ b/.github/workflows/tpp-benchmark.yml @@ -6,23 +6,15 @@ on: RUN_SPR_BENCH: description: "Run on Sapphire Rapids" default: 1 - required: true - type: string RUN_ZEN_BENCH: description: "Run on Zen4" default: 0 - required: true - type: string RUN_ADL_BENCH: description: "Run on Raptor Lake" default: 0 - required: true - type: string RUN_CLX_BENCH: description: "Run on Coffee Lake" default: 0 - required: true - type: string push: branches: [ "ghactions" ] pull_request: @@ -30,92 +22,107 @@ on: env: NPROCS_LIMIT_LINK: 8 + NUM_ITER: 100 jobs: Check_LLVM: - runs-on: self-hosted + runs-on: pcl-tiergarten steps: + - uses: actions/checkout@v4 - name: Check LLVM run: "BUILD=1 scripts/buildkite/check_llvm.sh" TPP-MLIR-SPR-BASE: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: ${{ github.event_name }} == "push" || ${{ github.event_name }} == "pull_request" || ${{ inputs.RUN_SPR_BENCH }} == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Sapphire Rapids Base - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: ${{ inputs.RUN_SPR_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" + ${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-SPR-OMP: - runs-on: self-hosted + runs-on: pcl-tiergarten needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Sapphire Rapids OpenMP - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: ${{ inputs.RUN_SPR_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" + ${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ZEN-BASE: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_ZEN_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Zen4 Base - run: "${{ secrets.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: ${{ inputs.RUN_ZEN_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" + ${{ secrets.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ZEN-OMP: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_ZEN_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Zen4 OpenMP - run: "${{ secrets.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: ${{ inputs.RUN_ZEN_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" + ${{ secrets.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-CLX-BASE: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_CLX_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Coffee Lake Base - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: ${{ inputs.RUN_CLX_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" + ${{ secrets.SRUN }} --partition=clxap --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-CLX-OMP: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_CLX_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Coffee Lake OpenMP - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: ${{ inputs.RUN_CLX_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" + ${{ secrets.SRUN }} --partition=clxap --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ADL-BASE: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_ADL_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Raptor Lake Base - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: ${{ inputs.RUN_ADL_BENCH }} == "1" + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" + ${{ secrets.SRUN }} --partition=rpl --time=2:00:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ADL-OMP: - runs-on: self-hosted + runs-on: pcl-tiergarten + if: inputs.RUN_ADL_BENCH == 1 needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Raptor Lake OpenMP - run: "${{ secrets.SRUN }} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: ${{ inputs.RUN_ADL_BENCH }} == "1" - - + run: |- + CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" + ${{ secrets.SRUN }} --partition=rpl --time=2:00:00 --constraint=\"notrb\" -- $CMD diff --git a/.github/workflows/tpp-mlir.yml b/.github/workflows/tpp-mlir.yml index 960633325..a4cceeb4b 100644 --- a/.github/workflows/tpp-mlir.yml +++ b/.github/workflows/tpp-mlir.yml @@ -12,43 +12,48 @@ env: jobs: Check_LLVM: - runs-on: self-hosted + runs-on: pcl-tiergarten steps: + - uses: actions/checkout@v4 - name: Check LLVM run: "BUILD=1 scripts/buildkite/check_llvm.sh" TPP-MLIR-gcc-rel: - runs-on: self-hosted + runs-on: pcl-tiergarten needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: GCC Release run: "${{ secrets.SRUN }} --partition=spr-all --time=0:30:00 -- \ 'KIND=Release COMPILER=gcc CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" TPP-MLIR-gcc-deb: - runs-on: self-hosted + runs-on: pcl-tiergarten needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: GCC Debug run: "${{ secrets.SRUN }} --partition=spr-all --time=0:30:00 -- \ 'KIND=Debug COMPILER=gcc CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" TPP-MLIR-clang-rel: - runs-on: self-hosted + runs-on: pcl-tiergarten needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Clang Release run: "${{ secrets.SRUN }} --partition=spr-all --time=0:30:00 -- \ 'KIND=Release COMPILER=clang LINKER=lld CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" TPP-MLIR-clang-deb: - runs-on: self-hosted + runs-on: pcl-tiergarten needs: Check_LLVM steps: + - uses: actions/checkout@v4 - name: Clang Debug Sanitizers run: "${{ secrets.SRUN }} --partition=spr-all --time=0:30:00 -- \ 'KIND=Debug COMPILER=clang LINKER=lld SANITIZERS=1 CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" diff --git a/scripts/buildkite/build_tpp.sh b/scripts/buildkite/build_tpp.sh index 9df7dc17c..fcf2cee9a 100755 --- a/scripts/buildkite/build_tpp.sh +++ b/scripts/buildkite/build_tpp.sh @@ -72,7 +72,7 @@ if [ ! "${PROJECT_DIR}" ]; then exit 1 fi if [ ! "${BUILD_DIR}" ]; then - BUILD_DIR="/tmp/tpp" + BUILD_DIR="build-${COMPILER}" fi BUILD_DIR=$(realpath ${BUILD_DIR}) BUILD_DIR=${BUILD_DIR:-build-${COMPILER}}