This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Add `OpFoldResult` builder to tensor.dim op
AbandonedPublic

Authored by frgossen on Jan 13 2023, 9:48 AM.

Details

Diff Detail

Event Timeline

frgossen created this revision.Jan 13 2023, 9:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2023, 9:48 AM
frgossen requested review of this revision.Jan 13 2023, 9:48 AM

Why is this needed? DimOp always takes Value for the dimension index. There is no index attribute, which would allow to fold constants into the dimOp. With the current DimOp it is easier to call getValueOrCreateConstantIndexOp when DimOp::build is called.

Right, getValueOrCreateConstantIndexOp works.
As there is a builder for int64_t, which creates a constant one for OpFoldResult would be the natural completion, no?

Don't feel strong about this though, so we can discard this also.

frgossen abandoned this revision.Jan 18 2023, 11:35 AM