This is an archive of the discontinued LLVM Phabricator instance.

Add Builder::get{I32,I64}TensorAttr.
ClosedPublic

Authored by silvas on Mar 18 2020, 7:51 PM.

Details

Summary

Builder::get{I32,I64}VectorAttr are actually of limited applicability since
vector types can't have zero elements, whereas many uses of this kind of
attribute (such as dimension lists for "transpose"-like and other tensor
ops) often can result in empty lists.

Diff Detail

Event Timeline

silvas created this revision.Mar 18 2020, 7:51 PM
Herald added a project: Restricted Project. · View Herald Transcript
bondhugula added inline comments.
mlir/include/mlir/IR/Builders.h
119

Nit: Cannot be empty -> values cannot be empty

123

Likewise.

silvas updated this revision to Diff 251250.Mar 18 2020, 8:15 PM

Address comments.

silvas marked 2 inline comments as done.Mar 18 2020, 8:16 PM
silvas updated this revision to Diff 251272.Mar 18 2020, 9:51 PM

Fix typo

rriddle accepted this revision.Mar 19 2020, 12:05 AM
rriddle added inline comments.
mlir/include/mlir/IR/Builders.h
119

nit: cannot -> must not

This revision is now accepted and ready to land.Mar 19 2020, 12:05 AM
silvas updated this revision to Diff 251424.Mar 19 2020, 11:30 AM

Address comments

silvas marked an inline comment as done.Mar 19 2020, 11:30 AM
This revision was automatically updated to reflect the committed changes.