Skip to content

Commit 380c056

Browse files
authored
[CI] Bump LLVM + CI partition changes (#1091)
Bump are mostly related to below LLVM patches: llvm/llvm-project#151150 - `InitAll` replaced by static library. So, added necessary header to our pipeline. llvm/llvm-project#147961 - Remove or update lit tests related to `matmul_transpose` For `CI`: - Removed `v100` and `clx` partition + removed benchmarking related to `CLX` base and omp runs, - Updated the `gcc` src to system src + cuda src to `12.9`,
1 parent c8dc585 commit 380c056

20 files changed

+55
-244
lines changed

.github/workflows/tpp-benchmark.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ on:
1111
description: "Run on Zen5"
1212
type: boolean
1313
default: true
14-
RUN_CLX_BENCH:
15-
description: "Run on CLX"
16-
type: boolean
17-
default: true
1814
RUN_ARL_BENCH:
1915
description: "Run on ARL"
2016
type: boolean
@@ -100,36 +96,6 @@ jobs:
10096
${{ github.workspace }}/scripts/github/benchmark.sh -o"
10197
${{ env.SRUN }} --partition=zen5 --time=0:30:00 -- $CMD
10298
103-
TPP-MLIR-CLX-BASE:
104-
runs-on: pcl-tiergarten
105-
if: |
106-
(github.event_name == 'push') ||
107-
(github.event_name == 'workflow_dispatch' && inputs.RUN_CLX_BENCH) ||
108-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark-full'))
109-
needs: Check_LLVM
110-
steps:
111-
- uses: actions/checkout@v4
112-
- name: CLX Base
113-
run: |-
114-
CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \
115-
${{ github.workspace }}/scripts/github/benchmark.sh -b -p"
116-
${{ env.SRUN }} --partition=clxap --time=0:30:00 -- $CMD
117-
118-
TPP-MLIR-CLX-OMP:
119-
runs-on: pcl-tiergarten
120-
if: |
121-
(github.event_name == 'push') ||
122-
(github.event_name == 'workflow_dispatch' && inputs.RUN_CLX_BENCH) ||
123-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'benchmark-full'))
124-
needs: Check_LLVM
125-
steps:
126-
- uses: actions/checkout@v4
127-
- name: CLX OpenMP
128-
run: |-
129-
CMD="KIND=Release COMPILER=clang LINKER=lld BENCHMARK_NUM_ITER=${{ env.NUM_ITER }} \
130-
${{ github.workspace }}/scripts/github/benchmark.sh -o"
131-
${{ env.SRUN }} --partition=clxap --time=0:30:00 -- $CMD
132-
13399
TPP-MLIR-ARL-BASE:
134100
runs-on: pcl-tiergarten
135101
if: |

.github/workflows/tpp-llvm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
- name: LLVM CUDA
2828
run: |-
2929
GPU=cuda scripts/github/check_llvm.sh || \
30-
${{ env.SRUN }} --partition=a100,v100 --time=0:30:00 -- \
30+
${{ env.SRUN }} --partition=a100 --time=0:30:00 -- \
3131
'KIND=RelWithDebInfo COMPILER=clang GPU=cuda \
3232
${{ github.workspace }}/scripts/github/build_llvm.sh'

build_tools/llvm_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eb6da944af31dd684be3ab2f93f453a3837a72c6
1+
8eba28bc8ce9447d09edda6fc79e2191a1669252

lib/TPP/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ add_mlir_library(TPPPipeline
2323

2424
LINK_LIBS PUBLIC
2525
MLIRIR
26-
${mlir_dialect_libs}
27-
${conversion_libs}
26+
MLIRRegisterAllDialects
27+
MLIRRegisterAllPasses
2828
TPPGPU
2929
TPPPassBundles
3030
)

lib/TPP/DefaultPipeline.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,32 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "TPP/PassBundles.h"
10-
119
#include "mlir/IR/BuiltinOps.h"
1210
#include "mlir/InitAllDialects.h"
1311
#include "mlir/InitAllPasses.h"
1412
#include "mlir/Pass/Pass.h"
1513
#include "mlir/Pass/PassManager.h"
1614
#include "llvm/Support/CommandLine.h"
1715

16+
#include "mlir/Conversion/Passes.h"
17+
#include "mlir/Dialect/MemRef/Transforms/Passes.h"
18+
#include "mlir/Dialect/Arith/Transforms/Passes.h"
19+
#include "mlir/Dialect/GPU/Transforms/Passes.h"
20+
#include "mlir/Dialect/Linalg/Passes.h"
21+
#include "mlir/Dialect/Async/Passes.h"
22+
#include "mlir/Dialect/Func/IR/FuncOps.h"
23+
#include "mlir/Pass/PassOptions.h"
24+
#include "mlir/Transforms/Passes.h"
25+
1826
#include "TPP/Dialect/Check/BufferizableOpInterfaceImpl.h"
1927
#include "TPP/Dialect/Check/CheckDialect.h"
2028
#include "TPP/Dialect/Perf/BufferizableOpInterfaceImpl.h"
2129
#include "TPP/Dialect/Perf/PerfDialect.h"
2230
#include "TPP/Dialect/Perf/PerfOps.h"
2331
#include "TPP/Dialect/Xsmm/XsmmDialect.h"
32+
#include "TPP/PassBundles.h"
2433
#include "TPP/PassUtils.h"
2534
#include "TPP/Transforms/Utils/VNNIUtils.h"
26-
#include "mlir/Transforms/Passes.h"
2735

2836
#include <string>
2937

lib/TPP/GPU/GpuPipeline.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "mlir/Dialect/NVGPU/IR/NVGPUDialect.h"
2121
#include "mlir/Dialect/SCF/IR/SCF.h"
2222
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
23+
#include "mlir/Dialect/XeGPU/Transforms/Passes.h"
2324
#include "mlir/IR/BuiltinOps.h"
2425
#include "mlir/InitAllDialects.h"
2526
#include "mlir/InitAllPasses.h"

lib/TPP/Transforms/ToBlockLayoutAndBack.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -459,14 +459,15 @@ namespace {
459459
static SmallVector<int64_t>
460460
getDefaultBlockingFactors(linalg::LinalgOp linalgOp) {
461461
assert(linalgOp && "expect a valid linalgOp");
462-
if (isa<linalg::Conv2DNchwFchwOp>(linalgOp) ||
463-
isa<linalg::Conv2DNhwcHwcfOp>(linalgOp)) {
462+
auto *op = linalgOp.getOperation();
463+
if (isa<linalg::Conv2DNchwFchwOp>(op) ||
464+
isa<linalg::Conv2DNhwcHwcfOp>(op)) {
464465
return {32, 32};
465466
}
466-
assert(isa<linalg::MatmulOp>(linalgOp) ||
467-
isa<linalg::BatchMatmulOp>(linalgOp) ||
468-
isa<linalg::MatmulTransposeAOp>(linalgOp) ||
469-
isa<linalg::MatmulTransposeBOp>(linalgOp));
467+
assert(isa<linalg::MatmulOp>(op) ||
468+
isa<linalg::BatchMatmulOp>(op) ||
469+
isa<linalg::MatmulTransposeAOp>(op) ||
470+
isa<linalg::MatmulTransposeBOp>(op));
470471
return {32, 32, 32};
471472
}
472473

@@ -492,12 +493,13 @@ struct PackMatmul : public tpp::impl::PackMatmulBase<PackMatmul> {
492493
auto packControlFn = [&](linalg::LinalgOp linalgOp)
493494
-> std::optional<linalg::BlockPackMatmulOptions> {
494495
linalg::BlockPackMatmulOptions options;
496+
auto *op = linalgOp.getOperation();
495497

496498
// Pack only these named matmul variants.
497-
if (!(isa<linalg::MatmulOp>(linalgOp) ||
498-
isa<linalg::MatmulTransposeAOp>(linalgOp) ||
499-
isa<linalg::MatmulTransposeBOp>(linalgOp) ||
500-
isa<linalg::BatchMatmulOp>(linalgOp))) {
499+
if (!(isa<linalg::MatmulOp>(op) ||
500+
isa<linalg::MatmulTransposeAOp>(op) ||
501+
isa<linalg::MatmulTransposeBOp>(op) ||
502+
isa<linalg::BatchMatmulOp>(op))) {
501503
return std::nullopt;
502504
}
503505

scripts/ci/setup_gpu_env.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ source ${SCRIPT_DIR}/ci/common.sh
1010
# Env CUDA setup
1111
if [[ ${GPU,,} =~ "cuda" ]]; then
1212
echo "Setting up CUDA environment"
13-
echo "Hard-coding CUDA-compatible GCC version (12.3)"
14-
source /swtools/gcc/gcc-12.3.0/gcc_vars.sh
15-
source /swtools/cuda/latest/cuda_vars.sh
13+
echo "Hard-coding MLIR-compatible CUDA version (12.9)"
14+
source /swtools/cuda/12.9.0/cuda_vars.sh
1615
check_program nvcc
1716
fi

scripts/github/build_tpp.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ echo "--- ENVIRONMENT"
3232
if [ ! "${COMPILER}" ]; then
3333
COMPILER=clang
3434
fi
35-
if [ "${COMPILER}" == "gcc" ]; then
36-
echo "Hard-coding GCC to a known stable version (12.3)"
37-
source /swtools/gcc/gcc-12.3.0/gcc_vars.sh
38-
fi
3935
if [ "${SANITIZERS}" ]; then
4036
SANITIZERS="-S"
4137
fi

test/Integration/vector-contract-to-outerproduct.mlir

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
// RUN: tpp-opt %s | tpp-run -e entry --entry-point-result=void -seed 123 -print > %t.1
22
// RUN: tpp-opt %s --vector-contract-to-outerproduct | tpp-run -e entry --entry-point-result=void -seed 123 -print > %t.2
3-
// RUN: diff %t.1 %t.2 | FileCheck %s --check-prefix=DIFF --allow-empty
3+
// RUN: fpcmp -r 0.0001 %t.1 %t.2 | FileCheck %s --check-prefix=DIFF --allow-empty
44

55
// RUN: tpp-opt %s | tpp-run -e permA --entry-point-result=void -seed 123 -print > %t.1
66
// RUN: tpp-opt %s --vector-contract-to-outerproduct | tpp-run -e permA --entry-point-result=void -seed 123 -print > %t.2
7-
// RUN: diff %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMA --allow-empty
7+
// RUN: fpcmp -r 0.0001 %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMA --allow-empty
88

99
// RUN: tpp-opt %s | tpp-run -e permB --entry-point-result=void -seed 123 -print > %t.1
1010
// RUN: tpp-opt %s --vector-contract-to-outerproduct | tpp-run -e permB --entry-point-result=void -seed 123 -print > %t.2
11-
// RUN: diff %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMA --allow-empty
11+
// RUN: fpcmp -r 0.0001 %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMA --allow-empty
1212

1313
// RUN: tpp-opt %s | tpp-run -e permAB --entry-point-result=void -seed 123 -print > %t.1
1414
// RUN: tpp-opt %s --vector-contract-to-outerproduct | tpp-run -e permAB --entry-point-result=void -seed 123 -print > %t.2
15-
// RUN: diff %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMAB --allow-empty
16-
15+
// RUN: fpcmp -r 0.0001 %t.1 %t.2 | FileCheck %s --check-prefix=DIFF-PERMAB --allow-empty
1716

1817
// DIFF-NOT: {{.}}
1918
#map = affine_map<(d0, d1, d2) -> (d0, d2)>

0 commit comments

Comments
 (0)