[Mlir-commits] [mlir] [mlir][tosa] Fix assertion failure in tosa-layerwise-constant-fold (PR #85670)

Spenser Bauman llvmlistbot at llvm.org
Tue Mar 19 06:59:38 PDT 2024


sabauma wrote:

> Looks good, just one question around the scope here: Is it just refactoring + not failing at runtime on dense resources, or should this also enable folding dense resources?

@TinaAMD The goal here was to prevent the crash in the existing logic. Some of the code was refactored a bit so that there was a single source of failure when something cannot be folded, otherwise I would have had to make `transposeType` fallible as well. That is why the change looks more extensive.

The `tryGetValue` method for `DenseResourceAttr` seems to always fail. I'm not sure if that is intentional, or an oversight. Given the docs around dense resources, it is not obvious to me if folding them is the right thing to do.

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


More information about the Mlir-commits mailing list