[Mlir-commits] [mlir] [mlir][nvgpu] Improve `tensormap.descriptor` Type Verifier (PR #77904)

Jacques Pienaar llvmlistbot at llvm.org
Tue Jan 30 20:32:12 PST 2024


================
@@ -355,6 +355,22 @@ std::optional<InFlightDiagnostic> verifyTmaDescriptorWithMemref(
   if (!descMemref.hasStaticShape())
     return op->emitError() << "the tensor map descriptor must be static shaped";
 
+  for (auto dim : descMemref.getShape()) {
+    if (dim <= 0 || dim > kMaxTMADimension) {
+      return op->emitError() << "the tensor map descriptor must not have zero "
----------------
jpienaar wrote:

The check is for in a range, but error is for one end?

https://github.com/llvm/llvm-project/pull/77904


More information about the Mlir-commits mailing list