File tree Expand file tree Collapse file tree 9 files changed +31
-18
lines changed
compiler/plugins/target/AMD-AIE/iree-amd-aie/IR Expand file tree Collapse file tree 9 files changed +31
-18
lines changed Original file line number Diff line number Diff line change 1212#include " mlir/IR/Builders.h"
1313#include " mlir/IR/OpImplementation.h"
1414#include " mlir/IR/PatternMatch.h"
15- #include " mlir/Interfaces/CopyOpInterface.h"
1615
1716namespace mlir ::iree_compiler::AMDAIE {
1817
Original file line number Diff line number Diff line change 88#define IREE_AMDAIE_DIALECT_DMAOPINTERFACE
99
1010include "mlir/IR/OpBase.td"
11- include "mlir/Interfaces/CopyOpInterface.td"
1211
1312//===----------------------------------------------------------------------===//
1413// Defines the interface for dma-like operations.
1514//===----------------------------------------------------------------------===//
1615
16+ def CopyOpInterface : OpInterface<"CopyOpInterface"> {
17+ let description = [{
18+ A copy-like operation is one that copies from source value to target value.
19+ }];
20+ let cppNamespace = "mlir::iree_compiler::AMDAIE";
21+
22+ let methods = [
23+ InterfaceMethod<
24+ /*desc=*/"Returns the source value for this copy operation",
25+ /*retTy=*/"::mlir::Value",
26+ /*methodName=*/"getSource"
27+ >,
28+ InterfaceMethod<
29+ /*desc=*/"Returns the target value for this copy operation",
30+ /*retTy=*/"::mlir::Value",
31+ /*methodName=*/"getTarget"
32+ >
33+ ];
34+ }
35+
1736def DoublyStridedOpInterface : OpInterface<"DoublyStridedOpInterface"> {
1837 let description = [{
1938 Interface for operations with strided access pattern on both source and target.
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ namespace mlir::iree_compiler::AMDAIE {
1313
1414namespace detail {
1515
16- SmallVector<mlir:: CopyOpInterface> getCopyLikeConsumers (
16+ SmallVector<CopyOpInterface> getCopyLikeConsumers (
1717 LogicalObjFifoOpInterface op) {
18- SmallVector<mlir:: CopyOpInterface> copyLikOps;
18+ SmallVector<CopyOpInterface> copyLikOps;
1919 for (Operation *userOp : op->getUsers ()) {
2020 if (auto copyOp = dyn_cast<CopyOpInterface>(userOp);
2121 copyOp && dyn_cast_if_present<LogicalObjFifoOpInterface>(
@@ -26,9 +26,9 @@ SmallVector<mlir::CopyOpInterface> getCopyLikeConsumers(
2626 return copyLikOps;
2727}
2828
29- SmallVector<mlir:: CopyOpInterface> getCopyLikeProducers (
29+ SmallVector<CopyOpInterface> getCopyLikeProducers (
3030 LogicalObjFifoOpInterface op) {
31- SmallVector<mlir:: CopyOpInterface> copyLikOps;
31+ SmallVector<CopyOpInterface> copyLikOps;
3232 for (Operation *userOp : op->getUsers ()) {
3333 if (auto copyOp = dyn_cast<CopyOpInterface>(userOp);
3434 copyOp && dyn_cast_if_present<LogicalObjFifoOpInterface>(
Original file line number Diff line number Diff line change 77#ifndef IREE_COMPILER_AMDAIE_LOGICALOBJFIFOOPINTERFACE_H_
88#define IREE_COMPILER_AMDAIE_LOGICALOBJFIFOOPINTERFACE_H_
99
10+ #include " iree-amd-aie/IR/AMDAIEDmaOpInterface.h"
1011#include " mlir/IR/OpImplementation.h"
1112#include " mlir/IR/PatternMatch.h"
12- #include " mlir/Interfaces/CopyOpInterface.h"
1313
1414namespace mlir ::iree_compiler::AMDAIE {
1515
@@ -18,12 +18,10 @@ class LogicalObjFifoOpInterface;
1818namespace detail {
1919
2020// / Return the consumer copy-like operations of the logical objFifo.
21- SmallVector<mlir::CopyOpInterface> getCopyLikeConsumers (
22- LogicalObjFifoOpInterface op);
21+ SmallVector<CopyOpInterface> getCopyLikeConsumers (LogicalObjFifoOpInterface op);
2322
2423// / Return the producer copy-like operations of the logical objFifo.
25- SmallVector<mlir::CopyOpInterface> getCopyLikeProducers (
26- LogicalObjFifoOpInterface op);
24+ SmallVector<CopyOpInterface> getCopyLikeProducers (LogicalObjFifoOpInterface op);
2725
2826} // namespace detail
2927
Original file line number Diff line number Diff line change 88#define IREE_AMDAIE_DIALECT_LOGICALOBJFIFOOPINTERFACE
99
1010include "mlir/IR/OpBase.td"
11- include "mlir/Interfaces/CopyOpInterface .td"
11+ include "iree-amd-aie/IR/AMDAIEDmaOpInterface .td"
1212
1313//===----------------------------------------------------------------------===//
1414// Defines the interface for logical objectFifo operations.
@@ -41,7 +41,7 @@ def LogicalObjFifoOpInterface : OpInterface<"LogicalObjFifoOpInterface"> {
4141 /*desc=*/[{
4242 Return the consumer copy-like operations of the logical objFifo.
4343 }],
44- /*retTy=*/"::llvm::SmallVector<::mlir::CopyOpInterface>",
44+ /*retTy=*/"::llvm::SmallVector<::mlir::iree_compiler::AMDAIE:: CopyOpInterface>",
4545 /*methodName=*/"getCopyLikeConsumers",
4646 /*args=*/(ins),
4747 /*methodBody=*/"",
@@ -54,7 +54,7 @@ def LogicalObjFifoOpInterface : OpInterface<"LogicalObjFifoOpInterface"> {
5454 /*desc=*/[{
5555 Return the producer copy-like operations of the logical objFifo.
5656 }],
57- /*retTy=*/"::llvm::SmallVector<::mlir::CopyOpInterface>",
57+ /*retTy=*/"::llvm::SmallVector<::mlir::iree_compiler::AMDAIE:: CopyOpInterface>",
5858 /*methodName=*/"getCopyLikeProducers",
5959 /*args=*/(ins),
6060 /*methodBody=*/"",
Original file line number Diff line number Diff line change 1616#include " mlir/IR/BuiltinAttributes.h"
1717#include " mlir/IR/BuiltinOps.h"
1818#include " mlir/IR/BuiltinTypes.h"
19- #include " mlir/Interfaces/CopyOpInterface.h"
2019#include " mlir/Interfaces/ViewLikeInterface.h"
2120
2221// clang-format off
Original file line number Diff line number Diff line change 77#ifndef IREE_AMDAIE_DIALECT_IREEAMDAIE_OPS
88#define IREE_AMDAIE_DIALECT_IREEAMDAIE_OPS
99
10- include "mlir/Interfaces/CopyOpInterface.td"
1110include "mlir/Interfaces/InferTypeOpInterface.td"
1211include "mlir/Interfaces/SideEffectInterfaces.td"
1312include "mlir/Interfaces/ViewLikeInterface.td"
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ iree_cc_library(
5050 iree-amd-aie::aie_runtime::AMDAIEEnums
5151 LLVMSupport
5252 MLIRArithUtils
53- MLIRCopyOpInterface
5453 MLIRDialectUtils
5554 MLIRIR
5655 MLIRParser
You can’t perform that action at this time.
0 commit comments