File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
mlir/lib/Dialect/Tosa/Transforms Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -981,11 +981,11 @@ struct TosaFoldConstantCast : public TosaFoldConstantBase<CastOp> {
981
981
warnAboutNaNToIntCast (elements, tosaCast, rewriter);
982
982
983
983
// Only fold splat tensors and those used only once to avoid duplicating
984
- // them.
984
+ // them and increasing memory consumption .
985
985
if (!inputTensor.hasOneUse () && !isa<SplatElementsAttr>(elements)) {
986
- return rewriter.notifyMatchFailure (tosaCast,
987
- " Currently, casts will only be folded "
988
- " if its input only has a single user" );
986
+ return rewriter.notifyMatchFailure (
987
+ tosaCast, " Currently, casts will only be folded "
988
+ " if its input only has a single user or is a splat value. " );
989
989
}
990
990
991
991
// Report a match failure for unexpected types
You can’t perform that action at this time.
0 commit comments