[Mlir-commits] [mlir] d6f2e32 - [mlir] Flip Tensor dialect and ViewLike (NFC)
Jacques Pienaar
llvmlistbot at llvm.org
Fri Aug 12 12:42:28 PDT 2022
Author: Jacques Pienaar
Date: 2022-08-12T12:41:32-07:00
New Revision: d6f2e32fc13992cf9c71fc2f880e4859d8b68a0d
URL: https://github.com/llvm/llvm-project/commit/d6f2e32fc13992cf9c71fc2f880e4859d8b68a0d
DIFF: https://github.com/llvm/llvm-project/commit/d6f2e32fc13992cf9c71fc2f880e4859d8b68a0d.diff
LOG: [mlir] Flip Tensor dialect and ViewLike (NFC)
Also requires updating view like interface to use prefixed form.
Differential Revision: https://reviews.llvm.org/D131361
Added:
Modified:
mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td
mlir/include/mlir/Interfaces/ViewLikeInterface.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td b/mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td
index 3c325e1c3ff47..b90ad98dc0559 100644
--- a/mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td
+++ b/mlir/include/mlir/Dialect/Tensor/IR/TensorBase.td
@@ -51,8 +51,7 @@ def Tensor_Dialect : Dialect {
"complex::ComplexDialect",
];
- // TODO: flip post changing ViewLike interface.
- let emitAccessorPrefix = kEmitAccessorPrefix_Both;
+ let emitAccessorPrefix = kEmitAccessorPrefix_Prefixed;
}
#endif // TENSOR_BASE
diff --git a/mlir/include/mlir/Interfaces/ViewLikeInterface.td b/mlir/include/mlir/Interfaces/ViewLikeInterface.td
index 0c6bc8629015c..e3fac807a7ea9 100644
--- a/mlir/include/mlir/Interfaces/ViewLikeInterface.td
+++ b/mlir/include/mlir/Interfaces/ViewLikeInterface.td
@@ -93,7 +93,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.offsets();
+ return $_op.getOffsets();
}]
>,
InterfaceMethod<
@@ -105,7 +105,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.sizes();
+ return $_op.getSizes();
}]
>,
InterfaceMethod<
@@ -117,7 +117,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.strides();
+ return $_op.getStrides();
}]
>,
InterfaceMethod<
@@ -129,7 +129,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.static_offsets();
+ return $_op.getStaticOffsets();
}]
>,
InterfaceMethod<
@@ -141,7 +141,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.static_sizes();
+ return $_op.getStaticSizes();
}]
>,
InterfaceMethod<
@@ -153,7 +153,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return $_op.static_strides();
+ return $_op.getStaticStrides();
}]
>,
InterfaceMethod<
@@ -165,8 +165,8 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return ::mlir::getMixedStridesOrOffsets($_op.static_offsets(),
- $_op.offsets());
+ return ::mlir::getMixedStridesOrOffsets($_op.getStaticOffsets(),
+ $_op.getOffsets());
}]
>,
InterfaceMethod<
@@ -178,7 +178,7 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return ::mlir::getMixedSizes($_op.static_sizes(), $_op.sizes());
+ return ::mlir::getMixedSizes($_op.getStaticSizes(), $_op.sizes());
}]
>,
InterfaceMethod<
@@ -190,8 +190,8 @@ def OffsetSizeAndStrideOpInterface : OpInterface<"OffsetSizeAndStrideOpInterface
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return ::mlir::getMixedStridesOrOffsets($_op.static_strides(),
- $_op.strides());
+ return ::mlir::getMixedStridesOrOffsets($_op.getStaticStrides(),
+ $_op.getStrides());
}]
>,
More information about the Mlir-commits
mailing list