Skip to content

Commit 221e7d8

Browse files
benvanikElias Joseph
authored andcommitted
Removing use if the iree_input dialect from linalgext. (#20255)
Signed-off-by: Elias Joseph <[email protected]>
1 parent 3d1baa4 commit 221e7d8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ iree_compiler_cc_library(
5252
":PassesIncGen",
5353
"//compiler/src/iree/compiler/Dialect/LinalgExt/IR",
5454
"//compiler/src/iree/compiler/Dialect/LinalgExt/Utils",
55-
"//llvm-external-projects/iree-dialects:IREEInputDialect",
55+
"//compiler/src/iree/compiler/Dialect/Util/IR",
5656
"@llvm-project//llvm:Support",
5757
"@llvm-project//mlir:AffineDialect",
5858
"@llvm-project//mlir:AffineUtils",

compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ iree_cc_library(
4141
"TransposeFusion.cpp"
4242
DEPS
4343
::PassesIncGen
44-
IREEInputDialect
4544
LLVMSupport
4645
MLIRAffineDialect
4746
MLIRAffineUtils
@@ -72,6 +71,7 @@ iree_cc_library(
7271
MLIRTransforms
7372
iree::compiler::Dialect::LinalgExt::IR
7473
iree::compiler::Dialect::LinalgExt::Utils
74+
iree::compiler::Dialect::Util::IR
7575
PUBLIC
7676
)
7777

compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/PadContractionToBlockSize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66

7-
#include "iree-dialects/Dialect/Input/InputDialect.h"
8-
#include "iree-dialects/Dialect/Input/InputOps.h"
97
#include "iree/compiler/Dialect/LinalgExt/Transforms/Passes.h"
8+
#include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
9+
#include "iree/compiler/Dialect/Util/IR/UtilOps.h"
1010
#include "mlir/Dialect/Arith/IR/Arith.h"
1111
#include "mlir/Dialect/Linalg/IR/Linalg.h"
1212
#include "mlir/Dialect/Tensor/IR/Tensor.h"
@@ -63,7 +63,7 @@ static bool padTensor(Location loc, OpOperand *operand,
6363
// Dynamic dim.
6464
Value inputDimValue = builder.create<tensor::DimOp>(loc, original, i);
6565
Value alignedDim =
66-
builder.create<IREE::Input::AlignOp>(loc, inputDimValue, alignment);
66+
builder.create<IREE::Util::AlignOp>(loc, inputDimValue, alignment);
6767
newPaddingSizes[i] = alignedDim;
6868
needsPad = true;
6969
}
@@ -93,7 +93,7 @@ struct PadContractionToBlockSizePass final
9393
PadContractionToBlockSizePass>::PadContractionToBlockSizePassBase;
9494

9595
void getDependentDialects(DialectRegistry &registry) const override {
96-
registry.insert<IREE::Input::IREEInputDialect>();
96+
registry.insert<IREE::Util::UtilDialect>();
9797
}
9898

9999
void runOnOperation() override {

compiler/src/iree/compiler/Dialect/LinalgExt/Transforms/test/pad_contraction_to_block_size.mlir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func.func @pad_matmul_noop(%arg0 : tensor<256x512xf32>, %arg1 : tensor<512x1024x
4747
// CHECK: %[[LHS_DIM0:.*]] = arith.constant 0 : index
4848
// CHECK: %[[LHS_DIM:.*]] = tensor.dim %arg0, %[[LHS_DIM0]] : tensor<?x512xf32>
4949
// CHECK: %[[LHS_ALIGN:.*]] = arith.constant 16 : index
50-
// CHECK: %[[LHS_DIM_ALIGNED:.*]] = iree_input.align %[[LHS_DIM]], %[[LHS_ALIGN]] : index
50+
// CHECK: %[[LHS_DIM_ALIGNED:.*]] = util.align %[[LHS_DIM]], %[[LHS_ALIGN]] : index
5151
// CHECK: %[[LHS_ZERO:.*]] = arith.constant 0.000000e+00 : f32
5252
// CHECK: %[[LHS_PADDED:.*]] = tensor.pad %arg0 low[0, 0] high{{\[}}%[[LHS_DIM_ALIGNED]], 0] {
5353
// CHECK: } : tensor<?x512xf32> to tensor<?x512xf32>
@@ -73,12 +73,12 @@ func.func @pad_matmul_dynamic_row(%arg0 : tensor<?x512xf32>, %arg1 : tensor<512x
7373
// Should trigger column alignment (32).
7474
// Pad RHS:
7575
// CHECK: %[[RHS_ALIGNMENT:.*]] = arith.constant 32 : index
76-
// CHECK: %[[RHS_ALIGNED_DIM:.*]] = iree_input.align %{{.*}}, %[[RHS_ALIGNMENT]] : index
76+
// CHECK: %[[RHS_ALIGNED_DIM:.*]] = util.align %{{.*}}, %[[RHS_ALIGNMENT]] : index
7777
// CHECK: %[[RHS_PADDED:.*]] = tensor.pad %arg1 low[0, 0] high[0, %[[RHS_ALIGNED_DIM]]] {
7878
// CHECK: } : tensor<512x?xf32> to tensor<512x?xf32>
7979
// Pad Output:
8080
// CHECK: %[[OUTPUT_ALIGNMENT:.*]] = arith.constant 32 : index
81-
// CHECK: %[[OUTPUT_ALIGNED_DIM:.*]] = iree_input.align %{{.*}}, %[[OUTPUT_ALIGNMENT]] : index
81+
// CHECK: %[[OUTPUT_ALIGNED_DIM:.*]] = util.align %{{.*}}, %[[OUTPUT_ALIGNMENT]] : index
8282
// CHECK: %[[OUTPUT_PADDED:.*]] = tensor.pad %arg2 low[0, 0] high[0, %[[OUTPUT_ALIGNED_DIM]]] {
8383
// CHECK: } : tensor<256x?xf32> to tensor<256x?xf32>
8484
// Matmul:

0 commit comments

Comments
 (0)