This is an archive of the discontinued LLVM Phabricator instance.

[mlir][DenseElementsAttr] ::get for Tensor and Complex
Needs RevisionPublic

Authored by atondwal on May 6 2022, 9:27 PM.

Details

Reviewers
rriddle

Diff Detail

Event Timeline

atondwal created this revision.May 6 2022, 9:27 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2022, 9:27 PM
atondwal requested review of this revision.May 6 2022, 9:27 PM
rriddle requested changes to this revision.May 6 2022, 10:37 PM

This patch doesn't look correct. This is just going to lead to an assert/crash in the other code path, the else branch there doesn't have any support for tensor or complex.

This revision now requires changes to proceed.May 6 2022, 10:37 PM

I expected this to Just Work, since it seems like it did before 0d5caa8, and because RankedTensorType and ComplexType just have arrays as storage types, same as DenseElementsAttr, but I'm not familiar with the invariant relevant to this bit of code.
AFAICT there aren't any failing assertions in the else branch; was able to use this to successfully construct a DEA of complex<f32>.
(hadn't meant to send this out for review just yet without checking in the tests; I think I misunderstood the cl2git flags)