Skip to content

Commit 6c47c85

Browse files
committed
LIT change because of llvm/llvm-project#136640 which folds linalg.index who are unit dims. This patch carries revert of llvm/llvm-project#137122. StableHLO and Torch-mlir needs to update their usage of GreedyRewriteConfig to use fluent API. i.e enableRegionSimplification = VS setRegionSimplificationLevel llvm/llvm-project#135970. StableHLO has issue with VHLO_IntegerAttr and APInt not being updated. StableHLO needs to be updated with that PR's change for us to be able to integrate. llvm/llvm-project#121389. Torch-MLIR needs to be updated with that PR's change for us to be able to integrate. Signed-off-by: Stanley Winata <[email protected]>
1 parent 1a8d229 commit 6c47c85

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

compiler/src/iree/compiler/API/Internal/CompilerDriver.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
#include "llvm/Support/SourceMgr.h"
6666
#include "llvm/Support/ThreadPool.h"
6767
#include "llvm/Support/ToolOutputFile.h"
68+
#include "llvm/TargetParser/Host.h"
6869
#include "mlir/Bytecode/BytecodeWriter.h"
6970
#include "mlir/CAPI/IR.h"
7071
#include "mlir/CAPI/Wrap.h"
@@ -1161,11 +1162,11 @@ void llvmVersionPrinter(llvm::raw_ostream &os) {
11611162
os << " with assertions";
11621163
#endif
11631164
#if LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
1164-
std::string CPU = std::string(sys::getHostCPUName());
1165+
std::string CPU = std::string(llvm::sys::getHostCPUName());
11651166
if (CPU == "generic")
11661167
CPU = "(unknown)";
11671168
os << ".\n"
1168-
<< " Default target: " << sys::getDefaultTargetTriple() << '\n'
1169+
<< " Default target: " << llvm::sys::getDefaultTargetTriple() << '\n'
11691170
<< " Host CPU: " << CPU;
11701171
#endif
11711172
os << '\n';

compiler/src/iree/compiler/GlobalOptimization/test/raise_special_ops.mlir

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,18 +341,17 @@ util.func public @test_slice_negate_cat_peephole(%arg0: tensor<1x32x1x128xf16>)
341341

342342
// CHECK-LABEL: util.func public @test_slice_negate_cat_peephole
343343
// CHECK-SAME: %[[ARG0:.+]]: tensor<1x32x1x128xf16>
344+
// CHECK: %[[C0:.+]] = arith.constant 0 : index
344345
// CHECK: %[[C1:.+]] = arith.constant 1 : index
345346
// CHECK: %[[EXPIN:.+]] = tensor.expand_shape %[[ARG0]] {{\[\[}}0], [1], [2], [3, 4]] output_shape [1, 32, 1, 2, 64] : tensor<1x32x1x128xf16> into tensor<1x32x1x2x64xf16>
346347
// CHECK: %[[NREV:.+]] = linalg.generic
347348
// CHECK-SAME: iterator_types = ["parallel", "parallel", "parallel", "parallel", "parallel"]
348349

349-
// CHECK: %[[I0:.+]] = linalg.index 0 : index
350350
// CHECK: %[[I1:.+]] = linalg.index 1 : index
351-
// CHECK: %[[I2:.+]] = linalg.index 2 : index
352351
// CHECK: %[[I3:.+]] = linalg.index 3 : index
353352
// CHECK: %[[I4:.+]] = linalg.index 4 : index
354353
// CHECK: %[[R3:.+]] = arith.subi %[[C1]], %[[I3]] : index
355-
// CHECK: %[[EXTR:.+]] = tensor.extract %expanded[%[[I0]], %[[I1]], %[[I2]], %[[R3]], %[[I4]]] : tensor<1x32x1x2x64xf16>
354+
// CHECK: %[[EXTR:.+]] = tensor.extract %expanded[%[[C0]], %[[I1]], %[[C0]], %[[R3]], %[[I4]]] : tensor<1x32x1x2x64xf16>
356355
// CHECK: %[[NEGF:.+]] = arith.negf %[[EXTR]] : f16
357356
// CHECK: %[[CMP:.+]] = arith.cmpi eq, %[[R3]], %[[C1]] : index
358357
// CHECK: %[[SEL:.+]] = arith.select %[[CMP]], %[[NEGF]], %[[EXTR]] : f16

third_party/llvm-project

Submodule llvm-project updated 1242 files

0 commit comments

Comments
 (0)