[Mlir-commits] [mlir] [mlir][tosa] Fix assertion failure in tosa-layerwise-constant-fold (PR #85670)
Spenser Bauman
llvmlistbot at llvm.org
Tue Mar 19 07:04:20 PDT 2024
================
@@ -114,6 +114,25 @@ func.func @transpose_nofold_quantized_types() -> tensor<1x1x2x2x!quant.uniform<i
// -----
+// CHECK-LABEL: @transpose_dense_resource
+func.func @transpose_dense_resource() -> tensor<2x2xf32> {
+ %0 = "tosa.const"() <{value = dense_resource<resource> : tensor<2x2xf32>}> : () -> tensor<2x2xf32>
+ %1 = "tosa.const"() <{value = dense<[1, 0]> : tensor<2xi32>}> : () -> tensor<2xi32>
+
+ // CHECK: tosa.transpose
----------------
sabauma wrote:
The refactoring was to clean up the logic so it had a single point of failure: the sequence of `tryGetValues` calls, I thought this made the code easier to reason about. As I mentioned in another comment, `tryGetValues` seems to fail for dense resources.
https://github.com/llvm/llvm-project/pull/85670
More information about the Mlir-commits
mailing list