This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Clarify vector.contract promotion behavior
ClosedPublic

Authored by antiagainst on Jan 30 2023, 10:44 AM.

Details

Summary

This commit updates vector.contract documentation to clarify
the promotion behavior if operands and the result have different
bitwidths. It also adds a check to disable signed/unsigned integer
types and only allow signless integers.

Diff Detail

Event Timeline

antiagainst created this revision.Jan 30 2023, 10:44 AM
antiagainst requested review of this revision.Jan 30 2023, 10:44 AM
dcaballe added inline comments.Jan 30 2023, 10:49 AM
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
116

Could we have an f16, f16 -> f32?

ThomasRaoux added inline comments.Jan 30 2023, 11:14 AM
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
116

Yes I don't think the promotion behavior is specific to integer. What is specific to integers is whether we do signed or zero extend.

antiagainst marked an inline comment as done.

Address comments

mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
116

Good catch. Reworded accordingly.

antiagainst marked an inline comment as done.Jan 30 2023, 11:19 AM

Address comments

antiagainst edited the summary of this revision. (Show Details)Jan 30 2023, 3:11 PM
antiagainst retitled this revision from [mlir][vector] Clarify integer vector.contract promotion behavior to [mlir][vector] Clarify vector.contract promotion behavior.
ThomasRaoux accepted this revision.Jan 30 2023, 3:32 PM

Thanks!

This revision is now accepted and ready to land.Jan 30 2023, 3:32 PM
dcaballe accepted this revision.Jan 30 2023, 4:05 PM
This revision was landed with ongoing or failed builds.Jan 30 2023, 4:08 PM
This revision was automatically updated to reflect the committed changes.