From e9e3136a3ec44a1f1c84c05d32785188c499331a Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Thu, 5 Dec 2024 13:57:52 +0000 Subject: [PATCH] [CI] Remove Buildkite logic from the repo (#993) We're now using Github Actions, and don't need to cross wires. --- .github/workflows/tpp-benchmark.yml | 84 ++++--------------- .github/workflows/tpp-llvm.yml | 8 +- .github/workflows/tpp-mlir.yml | 8 +- scripts/README.md | 13 +-- scripts/benchmarks/build_and_run.sh | 4 +- scripts/buildkite/tpp-benchmark.yml | 58 ------------- scripts/buildkite/tpp-gpu.yml | 27 ------ scripts/buildkite/tpp-llvm.yml | 19 ----- scripts/buildkite/tpp-mlir.yml | 29 ------- scripts/buildkite/tpp-performance.yml | 14 ---- scripts/ci/trigger.sh | 49 ----------- scripts/{buildkite => github}/benchmark.sh | 10 +-- .../{buildkite => github}/benchmark_gpu.sh | 6 +- scripts/{buildkite => github}/build_llvm.sh | 2 +- scripts/{buildkite => github}/build_tpp.sh | 8 +- scripts/{buildkite => github}/check_llvm.sh | 2 +- 16 files changed, 40 insertions(+), 301 deletions(-) delete mode 100644 scripts/buildkite/tpp-benchmark.yml delete mode 100644 scripts/buildkite/tpp-gpu.yml delete mode 100644 scripts/buildkite/tpp-llvm.yml delete mode 100644 scripts/buildkite/tpp-mlir.yml delete mode 100644 scripts/buildkite/tpp-performance.yml delete mode 100755 scripts/ci/trigger.sh rename scripts/{buildkite => github}/benchmark.sh (95%) rename scripts/{buildkite => github}/benchmark_gpu.sh (87%) rename scripts/{buildkite => github}/build_llvm.sh (99%) rename scripts/{buildkite => github}/build_tpp.sh (93%) rename scripts/{buildkite => github}/check_llvm.sh (95%) diff --git a/.github/workflows/tpp-benchmark.yml b/.github/workflows/tpp-benchmark.yml index f525d762b..d94629240 100644 --- a/.github/workflows/tpp-benchmark.yml +++ b/.github/workflows/tpp-benchmark.yml @@ -7,13 +7,7 @@ on: description: "Run on Emerald Rapids" default: "1" RUN_ZEN_BENCH: - description: "Run on Zen4" - default: "0" - RUN_ADL_BENCH: - description: "Run on Raptor Lake" - default: "0" - RUN_CLX_BENCH: - description: "Run on Coffee Lake" + description: "Run on Zen5" default: "0" push: branches: @@ -43,9 +37,9 @@ jobs: - uses: actions/checkout@v4 - name: Emerald Rapids Base run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" - ${{ env.SRUN }} --partition=emr --time=2:00:00 --constraint=\"notrb\" -- $CMD + CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/github/benchmark.sh -b -p" + ${{ env.SRUN }} --partition=emr --time=0:30:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-EMR-OMP: runs-on: pcl-tiergarten @@ -57,9 +51,9 @@ jobs: - uses: actions/checkout@v4 - name: Emerald Rapids OpenMP run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" - ${{ env.SRUN }} --partition=emr --time=2:00:00 --constraint=\"notrb\" -- $CMD + CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/github/benchmark.sh -o" + ${{ env.SRUN }} --partition=emr --time=0:30:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ZEN-BASE: runs-on: pcl-tiergarten @@ -67,11 +61,11 @@ jobs: needs: Check_LLVM steps: - uses: actions/checkout@v4 - - name: Zen4 Base + - name: Zen5 Base run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" - ${{ env.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- $CMD + CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/github/benchmark.sh -b -p" + ${{ env.SRUN }} --partition=zen5 --time=0:30:00 --constraint=\"notrb\" -- $CMD TPP-MLIR-ZEN-OMP: runs-on: pcl-tiergarten @@ -79,56 +73,8 @@ jobs: needs: Check_LLVM steps: - uses: actions/checkout@v4 - - name: Zen4 OpenMP - run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" - ${{ env.SRUN }} --partition=zen4 --time=2:00:00 --constraint=\"notrb\" -- $CMD - - TPP-MLIR-CLX-BASE: - runs-on: pcl-tiergarten - if: inputs.RUN_CLX_BENCH == 1 - needs: Check_LLVM - steps: - - uses: actions/checkout@v4 - - name: Coffee Lake Base - run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" - ${{ env.SRUN }} --partition=clxap --time=2:00:00 --constraint=\"notrb\" -- $CMD - - TPP-MLIR-CLX-OMP: - runs-on: pcl-tiergarten - if: inputs.RUN_CLX_BENCH == 1 - needs: Check_LLVM - steps: - - uses: actions/checkout@v4 - - name: Coffee Lake OpenMP - run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" - ${{ env.SRUN }} --partition=clxap --time=2:00:00 --constraint=\"notrb\" -- $CMD - - TPP-MLIR-ADL-BASE: - runs-on: pcl-tiergarten - if: inputs.RUN_ADL_BENCH == 1 - needs: Check_LLVM - steps: - - uses: actions/checkout@v4 - - name: Raptor Lake Base - run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -b -p" - ${{ env.SRUN }} --partition=rpl --time=2:00:00 --constraint=\"notrb\" -- $CMD - - TPP-MLIR-ADL-OMP: - runs-on: pcl-tiergarten - if: inputs.RUN_ADL_BENCH == 1 - needs: Check_LLVM - steps: - - uses: actions/checkout@v4 - - name: Raptor Lake OpenMP + - name: Zen5 OpenMP run: |- - CMD="KIND=Release COMPILER=clang LINKER=lld BUILDKITE_BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ - ${{ github.workspace }}/scripts/buildkite/benchmark.sh -o" - ${{ env.SRUN }} --partition=rpl --time=2:00:00 --constraint=\"notrb\" -- $CMD + CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \ + ${{ github.workspace }}/scripts/github/benchmark.sh -o" + ${{ env.SRUN }} --partition=zen5 --time=0:30:00 --constraint=\"notrb\" -- $CMD diff --git a/.github/workflows/tpp-llvm.yml b/.github/workflows/tpp-llvm.yml index 4bdc78673..533a37887 100644 --- a/.github/workflows/tpp-llvm.yml +++ b/.github/workflows/tpp-llvm.yml @@ -15,10 +15,10 @@ jobs: - uses: actions/checkout@v4 - name: LLVM Base run: |- - scripts/buildkite/check_llvm.sh || \ + scripts/github/check_llvm.sh || \ ${{ env.SRUN }} --partition=emr --time=0:30:00 -- \ 'KIND=RelWithDebInfo COMPILER=clang \ - ${{ github.workspace }}/scripts/buildkite/build_llvm.sh' + ${{ github.workspace }}/scripts/github/build_llvm.sh' TPP-MLIR-LLVM-CUDA: runs-on: pcl-tiergarten @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v4 - name: LLVM CUDA run: |- - GPU=cuda scripts/buildkite/check_llvm.sh || \ + GPU=cuda scripts/github/check_llvm.sh || \ ${{ env.SRUN }} --partition=a100,v100 --time=0:30:00 -- \ 'KIND=RelWithDebInfo COMPILER=clang GPU=cuda \ - ${{ github.workspace }}/scripts/buildkite/build_llvm.sh' + ${{ github.workspace }}/scripts/github/build_llvm.sh' diff --git a/.github/workflows/tpp-mlir.yml b/.github/workflows/tpp-mlir.yml index bfdc61e10..600941bc9 100644 --- a/.github/workflows/tpp-mlir.yml +++ b/.github/workflows/tpp-mlir.yml @@ -22,7 +22,7 @@ jobs: - name: GCC Release run: "${{ env.SRUN }} --partition=emr --time=0:30:00 -- \ 'KIND=Release COMPILER=gcc CHECK=1 ONEDNN=1 \ - ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/github/build_tpp.sh'" TPP-MLIR-gcc-deb: runs-on: pcl-tiergarten @@ -32,7 +32,7 @@ jobs: - name: GCC Debug run: "${{ env.SRUN }} --partition=emr --time=0:30:00 -- \ 'KIND=Debug COMPILER=gcc CHECK=1 ONEDNN=1 \ - ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/github/build_tpp.sh'" TPP-MLIR-clang-rel: runs-on: pcl-tiergarten @@ -42,7 +42,7 @@ jobs: - name: Clang Release run: "${{ env.SRUN }} --partition=emr --time=0:30:00 -- \ 'KIND=Release COMPILER=clang LINKER=lld CHECK=1 ONEDNN=1 \ - ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/github/build_tpp.sh'" TPP-MLIR-clang-deb: runs-on: pcl-tiergarten @@ -52,4 +52,4 @@ jobs: - name: Clang Debug Sanitizers run: "${{ env.SRUN }} --partition=emr --time=0:30:00 -- \ 'KIND=Debug COMPILER=clang LINKER=lld SANITIZERS=1 CHECK=1 ONEDNN=1 \ - ${{ github.workspace }}/scripts/buildkite/build_tpp.sh'" + ${{ github.workspace }}/scripts/github/build_tpp.sh'" diff --git a/scripts/README.md b/scripts/README.md index af3919ba0..452d31ef3 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -28,23 +28,16 @@ Scripts to CMake and build the project, run benchmarks etc. These should be generic to all environments, including developers' own machines. Given the appropriate dependencies are installed, these should work everywhere. -## Buildkite +## Github -Scripts executed by the Buildkite CI. There should be one script per rule, used by all different builds. - -There are two types of scripts: - -* YAML: Pipeline descrptions that the buildkite-agent will upload. -* BASH: Scripts that the YAML rules will call. - -There should be no code in the YAML files. Bash scripts can depend on and reuse generic CI-scripts. +Scripts executed by the Github CI. There should be one script per rule, used by all different builds. To run local tests like in the CI-environment (relies at least on the TPP-environment): ```bash cd tpp-mlir source scripts/env.sh -KIND=Debug COMPILER=clang LINKER=lld CHECK=1 GPU=cuda CLEAN=1 scripts/buildkite/build_tpp.sh +KIND=Debug COMPILER=clang LINKER=lld CHECK=1 GPU=cuda CLEAN=1 scripts/github/build_tpp.sh ``` Above scripts (scripts/env.sh) must be sourced from inside of the tpp-mlir directory (Git repository). diff --git a/scripts/benchmarks/build_and_run.sh b/scripts/benchmarks/build_and_run.sh index 3d4474ed1..2afdbd596 100755 --- a/scripts/benchmarks/build_and_run.sh +++ b/scripts/benchmarks/build_and_run.sh @@ -34,7 +34,7 @@ export LLVM_INSTALL_DIR=${LLVMROOT}/${LLVM_VERSION} export LLVM_TAR_DIR=${SOURCE_DIR}/llvm export LLVM_BUILD_DIR=${SOURCE_DIR}/llvm/build if [ ! -f "${LLVM_INSTALL_DIR}/bin/mlir-opt" ]; then - ${SCRIPT_DIR}/buildkite/build_llvm.sh + ${SCRIPT_DIR}/github/build_llvm.sh else echo "LLVM already built on ${LLVM_INSTALL_DIR}" fi @@ -42,7 +42,7 @@ fi # Build TPP-MLIR export BUILDKITE_BUILD_CHECKOUT_PATH=${SOURCE_DIR} export BUILD_DIR=${SOURCE_DIR}/build-${COMPILER} -${SCRIPT_DIR}/buildkite/build_tpp.sh +${SCRIPT_DIR}/github/build_tpp.sh # Run benchmarks export BENCH_DIR=${BUILDKITE_BUILD_CHECKOUT_PATH:-.}/benchmarks diff --git a/scripts/buildkite/tpp-benchmark.yml b/scripts/buildkite/tpp-benchmark.yml deleted file mode 100644 index 4f5ffa7d5..000000000 --- a/scripts/buildkite/tpp-benchmark.yml +++ /dev/null @@ -1,58 +0,0 @@ -env: - NPROCS_LIMIT_LINK: "8" - RUN_SPR_BENCH: 1 - #LIBXSMM_VERBOSE: 4 - #LIBXSMMFETCH: 1 - -steps: - - label: "LLVM" - command: "BUILD=1 scripts/buildkite/check_llvm.sh" - - wait - - - label: "TPP-MLIR-SPR-BASE" - command: "${SRUN} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: build.env("RUN_SPR_BENCH") == "1" - - - label: "TPP-MLIR-ZEN4-BASE" - command: "${SRUN} --partition=zen4 --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: build.env("RUN_ZEN4_BENCH") == "1" - - - label: "TPP-MLIR-CLX-BASE" - command: "${SRUN} --partition=clxap --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: build.env("RUN_CLX_BENCH") == "1" - - - label: "TPP-MLIR-ADL-BASE" - command: "${SRUN} --partition=rpl --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -b -p'" - if: build.env("RUN_ADL_BENCH") == "1" - - - label: "TPP-MLIR-SPR-OMP" - command: "${SRUN} --partition=spr --time=2:00:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: build.env("RUN_SPR_BENCH") == "1" - - - label: "TPP-MLIR-ZEN4-OMP" - command: "${SRUN} --partition=zen4 --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: build.env("RUN_ZEN4_BENCH") == "1" - - - label: "TPP-MLIR-CLX-OMP" - command: "${SRUN} --partition=clxap --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: build.env("RUN_CLX_BENCH") == "1" - - - label: "TPP-MLIR-ADL-OMP" - command: "${SRUN} --partition=rpl --time=2:00:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -o'" - if: build.env("RUN_ADL_BENCH") == "1" diff --git a/scripts/buildkite/tpp-gpu.yml b/scripts/buildkite/tpp-gpu.yml deleted file mode 100644 index 40f8f79fa..000000000 --- a/scripts/buildkite/tpp-gpu.yml +++ /dev/null @@ -1,27 +0,0 @@ -env: - NPROCS_LIMIT_LINK: "8" - #LIBXSMM_VERBOSE: 4 - #LIBXSMMFETCH: 1 - -steps: - - label: "LLVM-cuda" - command: "GPU=cuda BUILD=1 scripts/buildkite/check_llvm.sh" - - wait - - - label: "GPU-Nvidia-Cuda" - command: "${SRUN} --partition=v100 --time=0:30:00 -- \ - 'KIND=Debug COMPILER=clang LINKER=lld GPU=cuda CHECK=1 \ - scripts/buildkite/build_tpp.sh'" - env: - # ASAN flags required due to incompatibility with CUDA - # See: https://github.com/google/sanitizers/issues/629 - ASAN_OPTIONS: "protect_shadow_gap=0:replace_intrin=0:detect_leaks=0:${ASAN_OPTIONS}" - - - label: "GPU-Nvidia-Cuda-bench" - command: "${SRUN} --partition=a100 --time=0:30:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld GPU=cuda \ - scripts/buildkite/benchmark_gpu.sh'" - env: - # ASAN flags required due to incompatibility with CUDA - # See: https://github.com/google/sanitizers/issues/629 - ASAN_OPTIONS: "protect_shadow_gap=0:replace_intrin=0:detect_leaks=0:${ASAN_OPTIONS}" diff --git a/scripts/buildkite/tpp-llvm.yml b/scripts/buildkite/tpp-llvm.yml deleted file mode 100644 index 66cc0e10a..000000000 --- a/scripts/buildkite/tpp-llvm.yml +++ /dev/null @@ -1,19 +0,0 @@ -env: - NPROCS_LIMIT_LINK: "8" - -steps: - - label: "TPP-LLVM-base" - concurrency: 1 - concurrency_group: "tpp-llvm-base" - command: "scripts/buildkite/check_llvm.sh || \ - ${SRUN} --partition=spr --time=0:30:00 -- \ - 'KIND=RelWithDebInfo COMPILER=clang \ - scripts/buildkite/build_llvm.sh'" - - - label: "TPP-LLVM-cuda" - concurrency: 1 - concurrency_group: "tpp-llvm-cuda" - command: "GPU=cuda scripts/buildkite/check_llvm.sh || \ - ${SRUN} --partition=a100,v100 --time=0:30:00 -- \ - 'KIND=RelWithDebInfo COMPILER=clang GPU=cuda \ - scripts/buildkite/build_llvm.sh'" diff --git a/scripts/buildkite/tpp-mlir.yml b/scripts/buildkite/tpp-mlir.yml deleted file mode 100644 index 1503885e7..000000000 --- a/scripts/buildkite/tpp-mlir.yml +++ /dev/null @@ -1,29 +0,0 @@ -env: - NPROCS_LIMIT_LINK: "8" - #LIBXSMM_VERBOSE: 4 - #LIBXSMMFETCH: 1 - -steps: - - label: "LLVM" - command: "BUILD=1 scripts/buildkite/check_llvm.sh" - - wait - - - label: "TPP-MLIR-gcc-rel" - command: "${SRUN} --partition=spr-all --time=0:30:00 -- \ - 'KIND=Release COMPILER=gcc CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" - - - label: "TPP-MLIR-gcc-deb" - command: "${SRUN} --partition=spr-all --time=0:30:00 -- \ - 'KIND=Debug COMPILER=gcc CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" - - - label: "TPP-MLIR-clang-rel" - command: "${SRUN} --partition=spr-all --time=0:30:00 -- \ - 'KIND=Release COMPILER=clang LINKER=lld CHECK=1 ONEDNN=1 \ - scripts/buildkite/build_tpp.sh'" - - - label: "TPP-MLIR-clang-deb" - command: "${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'" diff --git a/scripts/buildkite/tpp-performance.yml b/scripts/buildkite/tpp-performance.yml deleted file mode 100644 index 2ae412920..000000000 --- a/scripts/buildkite/tpp-performance.yml +++ /dev/null @@ -1,14 +0,0 @@ -env: - NPROCS_LIMIT_LINK: "8" - #LIBXSMM_VERBOSE: 4 - #LIBXSMMFETCH: 1 - -steps: - - label: "LLVM" - command: "BUILD=1 scripts/buildkite/check_llvm.sh" - - wait - - - label: "TPP-MLIR-performance" - command: "${SRUN} --partition=spr --time=1:30:00 --constraint=\"notrb\" -- \ - 'KIND=Release COMPILER=clang LINKER=lld \ - scripts/buildkite/benchmark.sh -m -f'" diff --git a/scripts/ci/trigger.sh b/scripts/ci/trigger.sh deleted file mode 100755 index 8c160d8ba..000000000 --- a/scripts/ci/trigger.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# -# Triggers CI pipeline. - -set -eo pipefail - -# Include common utils -SCRIPT_DIR=$(realpath $(dirname $0)/..) -source ${SCRIPT_DIR}/ci/common.sh - -die_syntax() { - echo "Syntax: $0 -p PIPELINE -c COMMIT" - echo "" - echo " -p: Buildkite pipeline" - echo " -c: Commit SHA to be built" - exit 1 -} - -# Cmd-line opts -while getopts "p:c:" arg; do - case ${arg} in - p) - PIPELINE=${OPTARG} - ;; - c) - COMMIT=${OPTARG} - ;; - ?) - echo "Invalid option: ${OPTARG}" - die_syntax - ;; - esac -done - -# Mandatory arguments -if [ ! "${PIPELINE}" ] || [ ! "${COMMIT}" ]; then - die_syntax -fi - -# Create pipeline dynamically -PIPELINE_CMD="steps: - - trigger: ${PIPELINE} - label: ${COMMIT} - build: - commit: ${COMMIT} -" - -# Upload the new pipeline and add it to the current build. -echo "$PIPELINE_CMD" | buildkite-agent pipeline upload diff --git a/scripts/buildkite/benchmark.sh b/scripts/github/benchmark.sh similarity index 95% rename from scripts/buildkite/benchmark.sh rename to scripts/github/benchmark.sh index 0ea2e70c9..cabba9121 100755 --- a/scripts/buildkite/benchmark.sh +++ b/scripts/github/benchmark.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Script for Buildkite automation only. +# Script for automation only. # Environment variables must have been declared already. # # Run long benchmarks after building TPP-MLIR. @@ -57,18 +57,18 @@ if [ ! "$BENCH_BASE" ] && [ ! "$BENCH_PT" ] && [ ! "$BENCH_OMP" ] && exit 1 fi -BENCH_DIR=${BUILDKITE_BUILD_CHECKOUT_PATH:-.}/benchmarks +BENCH_DIR=benchmarks BUILD_DIR=$(realpath "${BUILD_DIR:-build-${COMPILER}}") CONFIG_DIR=$(realpath "${BENCH_DIR}/config") # CI jobs can make the run extra long NUM_ITER=100 -if [ "${BUILDKITE_BENCHMARK_NUM_ITER}" ]; then - NUM_ITER=${BUILDKITE_BENCHMARK_NUM_ITER} +if [ "${BENCHMARK_NUM_ITER}" ]; then + NUM_ITER=${BENCHMARK_NUM_ITER} fi # Build -eval "${SCRIPT_DIR}/buildkite/build_tpp.sh" +eval "${SCRIPT_DIR}/github/build_tpp.sh" # Benchmark benchmark () { diff --git a/scripts/buildkite/benchmark_gpu.sh b/scripts/github/benchmark_gpu.sh similarity index 87% rename from scripts/buildkite/benchmark_gpu.sh rename to scripts/github/benchmark_gpu.sh index 766cecd8e..952c05c5c 100755 --- a/scripts/buildkite/benchmark_gpu.sh +++ b/scripts/github/benchmark_gpu.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Script for Buildkite automation only. +# Script for automation only. # Environment variables must have been declared already. # # Run GPU benchmarks after building TPP-MLIR. @@ -9,7 +9,7 @@ SCRIPT_DIR=$(realpath "$(dirname "$0")/..") source "${SCRIPT_DIR}/ci/common.sh" -BENCH_DIR=${BUILDKITE_BUILD_CHECKOUT_PATH:-.}/benchmarks +BENCH_DIR=benchmarks BUILD_DIR=$(realpath "${BUILD_DIR:-build-${COMPILER}}") CONFIG_DIR=$(realpath "${BENCH_DIR}/config") @@ -21,7 +21,7 @@ else fi # Build -eval "GPU=${GPU_OPTION} ${SCRIPT_DIR}/buildkite/build_tpp.sh" +eval "GPU=${GPU_OPTION} ${SCRIPT_DIR}/github/build_tpp.sh" if [ $? != 0 ]; then exit 1 fi diff --git a/scripts/buildkite/build_llvm.sh b/scripts/github/build_llvm.sh similarity index 99% rename from scripts/buildkite/build_llvm.sh rename to scripts/github/build_llvm.sh index 1f8704aed..2311ba4b1 100755 --- a/scripts/buildkite/build_llvm.sh +++ b/scripts/github/build_llvm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Script for Buildkite automation only. +# Script for automation only. # Environment variables must have been declared already. # # CMake and build LLVM. diff --git a/scripts/buildkite/build_tpp.sh b/scripts/github/build_tpp.sh similarity index 93% rename from scripts/buildkite/build_tpp.sh rename to scripts/github/build_tpp.sh index fcf2cee9a..dd40750b7 100755 --- a/scripts/buildkite/build_tpp.sh +++ b/scripts/github/build_tpp.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Script for Buildkite automation only. +# Script for automation only. # Environment variables must have been declared already. # # CMake and build TPP-MLIR. @@ -66,11 +66,7 @@ if [ "${CLEAN}" ]; then fi # Defaults when lacking CI environment -PROJECT_DIR=${BUILDKITE_BUILD_CHECKOUT_PATH:-.} -if [ ! "${PROJECT_DIR}" ]; then - echo "PROJECT_DIR source path not set" - exit 1 -fi +PROJECT_DIR=. if [ ! "${BUILD_DIR}" ]; then BUILD_DIR="build-${COMPILER}" fi diff --git a/scripts/buildkite/check_llvm.sh b/scripts/github/check_llvm.sh similarity index 95% rename from scripts/buildkite/check_llvm.sh rename to scripts/github/check_llvm.sh index fd3855a9a..845dd3e69 100755 --- a/scripts/buildkite/check_llvm.sh +++ b/scripts/github/check_llvm.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Script for Buildkite automation only. +# Script for automation only. # Environment variables must have been declared already. # # Check LLVM installation.