This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tosa]Fix Rescale shift attr data type
AbandonedPublic

Authored by Tai78641 on Aug 8 2023, 1:50 PM.

Details

Reviewers
nicolasvasilache
Summary

Change Rescale shift attribute to be DenseI8ArrayAttr to match spec
(instead of DenseI32ArrayAttr)

Signed-off-by: Tai Ly <tai.ly@arm.com>
Change-Id: Ib9f492845eb7e71cb6bf32cbcd785011cae6eb3d

Diff Detail

Event Timeline

Tai78641 created this revision.Aug 8 2023, 1:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2023, 1:50 PM
Tai78641 requested review of this revision.Aug 8 2023, 1:50 PM
rsuderman added inline comments.
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
1760

For these kind of changes it is better to relax the requirement (support i32s and i8s) for a fixed period of time, then constrain back to i8. This allows downstream users to incrementally transition vs breaking all users immediately.

Tai78641 added inline comments.Aug 16 2023, 3:45 PM
mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
1760

not clear how to allow both i32 and i8 attr types for same attribute.
have considered adding a second attribute, eg, shift_i8, for a while and then remove shift later, then rename shift_i8 to shift.
seems there is no way to make this change without breaking users one way or another.
would appreciate any suggestions to phase this in.

If this one is still active, could we move it to PR?

If this one is still active, could we move it to PR?

done. https://github.com/llvm/llvm-project/pull/71084