[Mlir-commits] [mlir] [mlir][tensor] Fix PadOp::getConstantPaddingValue (PR #121205)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Dec 30 13:25:59 PST 2024
================
@@ -44,3 +46,26 @@ func.func @generalize_pad_tensor_dynamic_shape(%arg0: tensor<4x?x2x?xf32>, %arg1
} : tensor<4x?x2x?xf32> to tensor<4x?x?x?xf32>
return %out : tensor<4x?x?x?xf32>
}
+
+// -----
+
+// Ensure that the constant value inside the PadOp block does not cause a crash.
----------------
banach-space wrote:
[nit] Every test makes sure that the edge case being exercised doesn't crash. To me it would be more helpful to add some info that's _unique_ to this test. In particular, the fact that despite the pad value being constant, the "lowered" version is `tensor.generate` rather than `linalg.fill`. And that that's because the constant is defined in the PadOp region. That's clear _today_, but won't be so obvious in the future. My suggestion - update the comment.
https://github.com/llvm/llvm-project/pull/121205
More information about the Mlir-commits
mailing list