From 5e89dc0e577cd7d0937cfb612472cfe755149020 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 11:05:18 -0500 Subject: [PATCH 01/19] [CI] Add PVC github runner --- .github/workflows/build_gpu.yml | 95 +++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 .github/workflows/build_gpu.yml diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml new file mode 100644 index 000000000..40f4b36a0 --- /dev/null +++ b/.github/workflows/build_gpu.yml @@ -0,0 +1,95 @@ +name: GPU Build + +on: + push: + branches: + - main + pull_request: + branches: + - main + +permissions: read-all + +jobs: + build_linux: + name: Builds IMEX on Linux + runs-on: pvc + defaults: + run: + shell: bash -l -eo pipefail {0} + + strategy: + matrix: + python: [3.9] + + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python }} + activate-environment: imex-devel + + - name: Conda info + run: conda info + + - name: Install Build tools + run: | + conda install cmake ninja conda-forge::lit conda-forge::doxygen + conda list + + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Cache Vars + run: | + echo LLVM_SHA=$(cat build_tools/llvm_version.txt) | tee -a $GITHUB_ENV + + - name: Cache LLLVM-MLIR + id: cache-llvm-mlir + uses: actions/cache@v4 + env: + LLVM_CACHE_NUMBER: 2 # Increase to reset cache + with: + path: | + ${{ github.workspace }}/mlir + key: ${{ runner.os }}-build-llvm-${{ env.LLVM_CACHE_NUMBER }}-${{ env.LLVM_SHA }} + + - name: Build LLVM-MLIR + if: steps.cache-llvm-mlir.outputs.cache-hit != 'true' + run: | + git clone https://github.com/llvm/llvm-project --branch main --single-branch + cd llvm-project + git checkout $LLVM_SHA + git apply ../build_tools/patches/*.patch + + echo "INFO: Need to rebuild LLVM-MLIR. Previous installation for MLIR not found" + cmake -G Ninja -B build -S llvm \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DLLVM_ENABLE_PROJECTS=mlir \ + -DLLVM_ENABLE_ASSERTIONS=ON \ + -DLLVM_USE_LINKER=gold \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_TARGETS_TO_BUILD="X86;SPIRV" \ + -DLLVM_ENABLE_BINDINGS=OFF \ + -DLLVM_ENABLE_ZSTD=OFF \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/mlir + cmake --build build --target install + + - name: Build IMEX and run lit tests + shell: bash -le {0} + run: | + source /opt/intel/oneapi/setvars.sh + pip install psutil + ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit) -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DMLIR_ENABLE_SYCL_RUNNER=1 + cmake --build build --target check-imex + + - name: Build doxygen docs + shell: bash -le {0} + run: | + cmake --build build --target doc_doxygen From 93a1bd86218488f3d5e0fffc4c805d01e5125e7c Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 11:42:19 -0500 Subject: [PATCH 02/19] Trying to build imex as external llvm project --- .github/workflows/build_gpu.yml | 79 +++++++-------------------------- 1 file changed, 15 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 40f4b36a0..305be8792 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -18,78 +18,29 @@ jobs: run: shell: bash -l -eo pipefail {0} - strategy: - matrix: - python: [3.9] - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - - name: Setup conda - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - python-version: ${{ matrix.python }} - activate-environment: imex-devel - - - name: Conda info - run: conda info - - - name: Install Build tools - run: | - conda install cmake ninja conda-forge::lit conda-forge::doxygen - conda list - - name: Checkout repo uses: actions/checkout@v4 - - name: Setup Cache Vars + - name: Checkout MLIR run: | - echo LLVM_SHA=$(cat build_tools/llvm_version.txt) | tee -a $GITHUB_ENV - - - name: Cache LLLVM-MLIR - id: cache-llvm-mlir - uses: actions/cache@v4 - env: - LLVM_CACHE_NUMBER: 2 # Increase to reset cache - with: - path: | - ${{ github.workspace }}/mlir - key: ${{ runner.os }}-build-llvm-${{ env.LLVM_CACHE_NUMBER }}-${{ env.LLVM_SHA }} - - - name: Build LLVM-MLIR - if: steps.cache-llvm-mlir.outputs.cache-hit != 'true' - run: | - git clone https://github.com/llvm/llvm-project --branch main --single-branch + git clone https://github.com/llvm/llvm-project + export LLVM_SHA=$(cat build_tools/llvm_version.txt) cd llvm-project git checkout $LLVM_SHA git apply ../build_tools/patches/*.patch - echo "INFO: Need to rebuild LLVM-MLIR. Previous installation for MLIR not found" - cmake -G Ninja -B build -S llvm \ - -DCMAKE_BUILD_TYPE=MinSizeRel \ - -DLLVM_ENABLE_PROJECTS=mlir \ - -DLLVM_ENABLE_ASSERTIONS=ON \ - -DLLVM_USE_LINKER=gold \ - -DLLVM_INSTALL_UTILS=ON \ - -DLLVM_TARGETS_TO_BUILD="X86;SPIRV" \ - -DLLVM_ENABLE_BINDINGS=OFF \ - -DLLVM_ENABLE_ZSTD=OFF \ - -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/mlir - cmake --build build --target install - - - name: Build IMEX and run lit tests - shell: bash -le {0} + - name: Setup IMEX and run tests run: | source /opt/intel/oneapi/setvars.sh - pip install psutil - ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit) -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DMLIR_ENABLE_SYCL_RUNNER=1 - cmake --build build --target check-imex - - - name: Build doxygen docs - shell: bash -le {0} - run: | - cmake --build build --target doc_doxygen + pip install psutil + # Currently, IMEX has tests that rely on both upstream SYCL and IMEX internal runtimes. This is the reason for having both IMEX_ENABLE_SYCL_RUNTIME and MLIR_ENABLE_SYCL_RUNNER + ./scripts/compile.sh -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 + cmake --build build --target check-imex | tee build/tests.txt + + - name: Upload tests.txt + if: ${{ always() }} + uses: actions/upload-artifact@v4 + with: + name: tests_gpu.txt + path: build/tests.txt From 26ff340dc465c31755b046f95439d2fb0d91cf8b Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 11:47:44 -0500 Subject: [PATCH 03/19] Switch off pip install --- .github/workflows/build_gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 305be8792..02b535d50 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -33,7 +33,7 @@ jobs: - name: Setup IMEX and run tests run: | source /opt/intel/oneapi/setvars.sh - pip install psutil + # pip install psutil # Currently, IMEX has tests that rely on both upstream SYCL and IMEX internal runtimes. This is the reason for having both IMEX_ENABLE_SYCL_RUNTIME and MLIR_ENABLE_SYCL_RUNNER ./scripts/compile.sh -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt From 9d221ad6cc8a89ee8284af3cc3b878fc508f205e Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 12:09:11 -0500 Subject: [PATCH 04/19] Trying with separate llvm build again --- .github/workflows/build_gpu.yml | 45 +++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 02b535d50..1e62e7783 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -22,22 +22,47 @@ jobs: - name: Checkout repo uses: actions/checkout@v4 - - name: Checkout MLIR + - name: Setup Cache Vars run: | - git clone https://github.com/llvm/llvm-project - export LLVM_SHA=$(cat build_tools/llvm_version.txt) + echo LLVM_SHA=$(cat build_tools/llvm_version.txt) | tee -a $GITHUB_ENV + + - name: Cache LLLVM-MLIR + id: cache-llvm-mlir + uses: actions/cache@v4 + env: + LLVM_CACHE_NUMBER: 2 # Increase to reset cache + with: + path: | + ${{ github.workspace }}/mlir + key: ${{ runner.os }}-build-llvm-${{ env.LLVM_CACHE_NUMBER }}-${{ env.LLVM_SHA }} + + - name: Build LLVM-MLIR + if: steps.cache-llvm-mlir.outputs.cache-hit != 'true' + run: | + git clone https://github.com/llvm/llvm-project --branch main --single-branch cd llvm-project git checkout $LLVM_SHA git apply ../build_tools/patches/*.patch - - name: Setup IMEX and run tests + echo "INFO: Need to rebuild LLVM-MLIR. Previous installation for MLIR not found" + cmake -G Ninja -B build -S llvm \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DLLVM_ENABLE_PROJECTS=mlir \ + -DLLVM_ENABLE_ASSERTIONS=ON \ + -DLLVM_USE_LINKER=gold \ + -DLLVM_INSTALL_UTILS=ON \ + -DLLVM_TARGETS_TO_BUILD="X86;SPIRV" \ + -DLLVM_ENABLE_BINDINGS=OFF \ + -DLLVM_ENABLE_ZSTD=OFF \ + -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/mlir + cmake --build build --target install + + - name: Build IMEX and run lit tests + shell: bash -le {0} run: | - source /opt/intel/oneapi/setvars.sh - # pip install psutil - # Currently, IMEX has tests that rely on both upstream SYCL and IMEX internal runtimes. This is the reason for having both IMEX_ENABLE_SYCL_RUNTIME and MLIR_ENABLE_SYCL_RUNNER - ./scripts/compile.sh -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=. -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 - cmake --build build --target check-imex | tee build/tests.txt - + ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit) -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 + cmake --build build --target check-imex | tee build/tests.txt + - name: Upload tests.txt if: ${{ always() }} uses: actions/upload-artifact@v4 From 4533fa0c14c04af27c8abddb605ed01152a210c9 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 12:26:42 -0500 Subject: [PATCH 05/19] Source oneapi setvars --- .github/workflows/build_gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 1e62e7783..34038f298 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -60,6 +60,7 @@ jobs: - name: Build IMEX and run lit tests shell: bash -le {0} run: | + source /opt/intel/oneapi/setvars.sh ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit) -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt From 0bf6ad90bed9ac2e11ca17a335b52c0d8edfd839 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 12:42:10 -0500 Subject: [PATCH 06/19] Fix config for MLIR_SYCL_RUNNER --- .github/workflows/build_gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 34038f298..05b90b2c2 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -54,6 +54,7 @@ jobs: -DLLVM_TARGETS_TO_BUILD="X86;SPIRV" \ -DLLVM_ENABLE_BINDINGS=OFF \ -DLLVM_ENABLE_ZSTD=OFF \ + -DMLIR_ENABLE_SYCL_RUNNER=1 \ -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/mlir cmake --build build --target install @@ -61,7 +62,7 @@ jobs: shell: bash -le {0} run: | source /opt/intel/oneapi/setvars.sh - ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DLLVM_EXTERNAL_LIT=$(which lit) -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 + ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt - name: Upload tests.txt From 34013a617c05fdf79589b33aa4c572c2664ada33 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 12:49:18 -0500 Subject: [PATCH 07/19] Proper palce for oneapi sourcing --- .github/workflows/build_gpu.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 05b90b2c2..109ef65a3 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -43,6 +43,8 @@ jobs: cd llvm-project git checkout $LLVM_SHA git apply ../build_tools/patches/*.patch + source /opt/intel/oneapi/setvars.sh + echo "INFO: Need to rebuild LLVM-MLIR. Previous installation for MLIR not found" cmake -G Ninja -B build -S llvm \ @@ -61,10 +63,9 @@ jobs: - name: Build IMEX and run lit tests shell: bash -le {0} run: | - source /opt/intel/oneapi/setvars.sh ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt - + - name: Upload tests.txt if: ${{ always() }} uses: actions/upload-artifact@v4 From 695b9903cedf194b52810f495c08972f7a45d4a9 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 12:58:07 -0500 Subject: [PATCH 08/19] Trigger llvm rebuild --- .github/workflows/build_gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 109ef65a3..6808b50c1 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -30,7 +30,7 @@ jobs: id: cache-llvm-mlir uses: actions/cache@v4 env: - LLVM_CACHE_NUMBER: 2 # Increase to reset cache + LLVM_CACHE_NUMBER: 3 # Increase to reset cache with: path: | ${{ github.workspace }}/mlir From f0ba44d64ddf5b5be5070d39dc825b43b4a66b97 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 13:11:17 -0500 Subject: [PATCH 09/19] Source oneapi befor imex building as well --- .github/workflows/build_gpu.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 6808b50c1..85e2d11b2 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -59,10 +59,11 @@ jobs: -DMLIR_ENABLE_SYCL_RUNNER=1 \ -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/mlir cmake --build build --target install - + - name: Build IMEX and run lit tests shell: bash -le {0} run: | + source /opt/intel/oneapi/setvars.sh ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt From e647cbc86b615de7ddee34e0b2ad1f3ca304a74b Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 13:37:48 -0500 Subject: [PATCH 10/19] Restore conda setup --- .github/workflows/build_gpu.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 85e2d11b2..39e80b5d7 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -19,6 +19,21 @@ jobs: shell: bash -l -eo pipefail {0} steps: + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 + with: + auto-update-conda: true + python-version: ${{ matrix.python }} + activate-environment: imex-devel + + - name: Conda info + run: conda info + + - name: Install Build tools + run: | + conda install cmake ninja conda-forge::lit conda-forge::doxygen + conda list + - name: Checkout repo uses: actions/checkout@v4 @@ -64,7 +79,7 @@ jobs: shell: bash -le {0} run: | source /opt/intel/oneapi/setvars.sh - ./scripts/compile.sh -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 + ./scripts/compile.sh -DLLVM_EXTERNAL_LIT="../llvm-project/build/utils/lit" -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt - name: Upload tests.txt From 1136d5065568b37d1f24ee4002ffa2da0815bb82 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 13:52:47 -0500 Subject: [PATCH 11/19] Trying cpu runner --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4867fcb8e..cd93ee3dc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ permissions: read-all jobs: build_linux: name: Builds IMEX on Linux - runs-on: ubuntu-22.04 + runs-on: cpu defaults: run: shell: bash -l -eo pipefail {0} From 6b0e206eab9acec3a192b8b1836c28d287fbdf3d Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 16:18:13 -0500 Subject: [PATCH 12/19] Try to use miniforge --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cd93ee3dc..f8a4da7f6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,6 +31,9 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v3 with: + installer-url: https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh + channels: conda-forge + channel-priority: strict auto-update-conda: true python-version: ${{ matrix.python }} activate-environment: imex-devel From 8f867d3afc2e10829f1b4cdc648521e6d95c8bea Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 16:37:11 -0500 Subject: [PATCH 13/19] Trying miniforge latest --- .github/workflows/build.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8a4da7f6..88863590a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,10 +31,11 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v3 with: - installer-url: https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh - channels: conda-forge - channel-priority: strict - auto-update-conda: true + #installer-url: https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh + #channels: conda-forge + #channel-priority: strict + miniforge-version: latest + #auto-update-conda: true python-version: ${{ matrix.python }} activate-environment: imex-devel From 16991bce4f5767b888c412bba91c6ba6b74f4293 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 16:51:15 -0500 Subject: [PATCH 14/19] Proper conda setup --- .github/workflows/build_gpu.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 39e80b5d7..ae4cb8f43 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -18,11 +18,16 @@ jobs: run: shell: bash -l -eo pipefail {0} + strategy: + matrix: + python: [3.9] + steps: - name: Setup conda uses: conda-incubator/setup-miniconda@v3 with: - auto-update-conda: true + miniforge-version: latest + #auto-update-conda: true python-version: ${{ matrix.python }} activate-environment: imex-devel From a692e279ae49c55e02b0de427803f5ff1f863047 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 16:52:47 -0500 Subject: [PATCH 15/19] REstore external lit set up --- .github/workflows/build_gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index ae4cb8f43..9b2522a4b 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -84,7 +84,7 @@ jobs: shell: bash -le {0} run: | source /opt/intel/oneapi/setvars.sh - ./scripts/compile.sh -DLLVM_EXTERNAL_LIT="../llvm-project/build/utils/lit" -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 + ./scripts/compile.sh -DLLVM_EXTERNAL_LIT=$(which lit) -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt - name: Upload tests.txt From b402df5af67b23cf64e392f5b0555866d71d6bb3 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 17:06:34 -0500 Subject: [PATCH 16/19] Add psutil install --- .github/workflows/build_gpu.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 9b2522a4b..4c467200c 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -84,6 +84,7 @@ jobs: shell: bash -le {0} run: | source /opt/intel/oneapi/setvars.sh + pip install psutil ./scripts/compile.sh -DLLVM_EXTERNAL_LIT=$(which lit) -DLLVM_LIT_ARGS="-a" -DMLIR_DIR=${{ github.workspace }}/mlir/lib/cmake/mlir -DIMEX_ENABLE_PVC_TARGET=1 -DIMEX_ENABLE_SYCL_RUNTIME=1 -DIMEX_ENABLE_L0_RUNTIME=1 -DLLVM_LIT_ARGS="-a -j 4 --debug --timeout=1800" -DMLIR_ENABLE_SYCL_RUNNER=1 cmake --build build --target check-imex | tee build/tests.txt From 39e9d2e93a6243fea38ac420457e609c9324e689 Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 18:13:29 -0500 Subject: [PATCH 17/19] Exclude inappropriate tests --- test/PlaidML/lit.local.cfg | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/PlaidML/lit.local.cfg b/test/PlaidML/lit.local.cfg index 521d62516..4fed4aac9 100644 --- a/test/PlaidML/lit.local.cfg +++ b/test/PlaidML/lit.local.cfg @@ -18,5 +18,16 @@ local_excludes = [ 'OpTest.GEMV_FLOAT32.mlir', 'OpTest.Shape.mlir' ] + +non_pvc_tests = [ + 'CppEdsl.Convolution_BF16.mlir', + 'OpTest.BroadcastNonNumpy_BF16.mlir', + 'OpTest.Relu_BF16.mlir', + 'OpTest.Transpose_BF16.mlir', +] + +if(config.imex_enable_pvc_target or config.imex_enable_bmg_target): + config.excludes.update(non_pvc_tests) + if(not config.imex_enable_excluded_tests): config.excludes.update(local_excludes) From 18a5b658e0208e130c012507d339a25ab27f4b0b Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 18:52:47 -0500 Subject: [PATCH 18/19] Clean up --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 88863590a..df4c413cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,11 +31,8 @@ jobs: - name: Setup conda uses: conda-incubator/setup-miniconda@v3 with: - #installer-url: https://github.com/conda-forge/miniforge/releases/download/25.3.0-3/Miniforge3-25.3.0-3-Linux-x86_64.sh - #channels: conda-forge - #channel-priority: strict miniforge-version: latest - #auto-update-conda: true + auto-update-conda: true python-version: ${{ matrix.python }} activate-environment: imex-devel From e5a0dc760fe63997f74474cb62670df0830a1b6c Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Tue, 17 Jun 2025 19:30:04 -0500 Subject: [PATCH 19/19] Clean up --- .github/workflows/build_gpu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_gpu.yml b/.github/workflows/build_gpu.yml index 4c467200c..07f27f033 100644 --- a/.github/workflows/build_gpu.yml +++ b/.github/workflows/build_gpu.yml @@ -27,7 +27,7 @@ jobs: uses: conda-incubator/setup-miniconda@v3 with: miniforge-version: latest - #auto-update-conda: true + auto-update-conda: true python-version: ${{ matrix.python }} activate-environment: imex-devel