[mlir][tosa] Fix assertion failure in tosa-layerwise-constant-fold (#85670)
The existing implementation of tosa-layerwise-constant-fold only works for constant values backed by DenseElementsAttr. For constants which hold DenseResourceAttrs, the folder will end up asserting at runtime, as it assumes that the backing data can always be accessed through ElementsAttr::getValues. This change reworks the logic so that types types used to perform folding are based on whether the ElementsAttr can be converted to a range of that particular type. --------- Co-authored-by:Spenser Bauman <sabauma@mathworks.com> Co-authored-by:
Tina Jung <tinamaria.jung@amd.com>
parent
73402634
Please register or sign in to comment