[Mlir-commits] [mlir] add extra check on distribute types to avoid crashes (PR #102952)

Jakub Kuderski llvmlistbot at llvm.org
Mon Aug 12 12:32:22 PDT 2024


================
@@ -1689,6 +1689,9 @@ struct WarpOpScfForOp : public OpRewritePattern<WarpExecuteOnLane0Op> {
           }
         });
 
+    if (llvm::any_of(distTypes, [](Type type) { return !type; }))
----------------
kuhar wrote:

you could also do `if (llvm::is_contained(distTypes, Type{}))`

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


More information about the Mlir-commits mailing list