[Mlir-commits] [mlir] [MLIR][NVVM] Add Op for TMA Prefetch (PR #116232)
Durgadoss R
llvmlistbot at llvm.org
Thu Nov 14 11:30:27 PST 2024
================
@@ -108,6 +108,22 @@ LogicalResult CpAsyncOp::verify() {
return success();
}
+LogicalResult CpAsyncBulkTensorPrefetchOp::verify() {
+ if (getCoordinates().empty() || getCoordinates().size() > 5)
+ return emitError("expects coordinates between 1 to 5 dimension");
+
+ // Check for im2col mode
+ if (!getIm2colOffsets().empty()) {
+ if (getCoordinates().size() < 3)
+ return emitError(
+ "to use im2col mode, the tensor has to be at least 3-dimensional");
+ if (getCoordinates().size() != (getIm2colOffsets().size() + 2))
+ return emitError(
+ "im2col offsets must be 2 less than number of coordinates");
----------------
durga4github wrote:
Sure, I moved it to a common function in the latest revision.
https://github.com/llvm/llvm-project/pull/116232
More information about the Mlir-commits
mailing list