This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa] Fix crash when inferring shape of tosa.equal
ClosedPublic

Authored by sabauma on May 1 2023, 6:41 AM.

Details

Summary

The tosa-infer-shapes pass crashes when trying to infer the output shape
of tosa.equal when the input shape is unranked.
This is due to tosa-infer-shapes requiring at least information on the
base type of the resulting operation from inferReturnTypeComponents.
This change enhances EqualOp::inferReturnTypeComponents to always supply
the inferred elementType.

Diff Detail

Event Timeline

sabauma created this revision.May 1 2023, 6:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 6:41 AM
sabauma published this revision for review.May 1 2023, 7:25 AM
eric-k256 accepted this revision.May 1 2023, 8:45 AM

LGTM.

This revision is now accepted and ready to land.May 1 2023, 8:45 AM

If there are no other comments, could someone with submission privileges please submit the patch?

This revision was automatically updated to reflect the committed changes.