[all-commits] [llvm/llvm-project] fa6e43: [mlir][tosa] Fix assertion failure in tosa-layerwi...
Spenser Bauman via All-commits
all-commits at lists.llvm.org
Thu Mar 21 06:02:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa6e4338369c787710f1fe682cf6bd62348b9104
https://github.com/llvm/llvm-project/commit/fa6e4338369c787710f1fe682cf6bd62348b9104
Author: Spenser Bauman <sbauman at mathworks.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M mlir/lib/Dialect/Tosa/Transforms/TosaFolders.cpp
M mlir/test/Dialect/Tosa/constant-op-fold.mlir
Log Message:
-----------
[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 at mathworks.com>
Co-authored-by: Tina Jung <tinamaria.jung at amd.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list