This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Tighten verification of SparseElementsAttr
ClosedPublic

Authored by rriddle on Sep 2 2021, 1:29 PM.

Details

Summary

SparseElementsAttr currently does not perform any verfication on construction, with the only verification existing within the parser. This revision moves the parser verification to SparseElementsAttr, and also adds additional verification for when a sparse index is not valid.

Diff Detail

Event Timeline

rriddle created this revision.Sep 2 2021, 1:29 PM
rriddle requested review of this revision.Sep 2 2021, 1:29 PM
jpienaar accepted this revision.Sep 3 2021, 4:31 PM
jpienaar added inline comments.
mlir/include/mlir/IR/BuiltinAttributes.h
75

Nit: 1-dimensional

mlir/lib/IR/BuiltinAttributes.cpp
1439

else failure ?

This revision is now accepted and ready to land.Sep 3 2021, 4:31 PM
rriddle updated this revision to Diff 373733.Sep 20 2021, 3:57 PM
rriddle marked 2 inline comments as done.

Update

This revision was landed with ongoing or failed builds.Sep 20 2021, 6:58 PM
This revision was automatically updated to reflect the committed changes.