[Mlir-commits] [mlir] [mlir][bufferization] Fix OneShotBufferize when `defaultMemorySpaceFn` is used (PR #91524)

Christopher Bate llvmlistbot at llvm.org
Sun Sep 8 12:42:40 PDT 2024


================
@@ -67,10 +67,14 @@ BufferizeTypeConverter::BufferizeTypeConverter() {
                               ValueRange inputs, Location loc) -> Value {
     assert(inputs.size() == 1 && "expected exactly one input");
 
+    // Unranked to ranked casts must be explicit.
+    if (auto inputType = dyn_cast<UnrankedMemRefType>(inputs[0].getType()))
----------------
christopherbate wrote:

I removed this. At the end of this materialization function there is ` llvm_unreachable("only tensor/memref input types supported");`, but if the input is `UnrankedMemRefType`, then it will still hit the `unreachable`.  Is that by design?

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


More information about the Mlir-commits mailing list