This is an archive of the discontinued LLVM Phabricator instance.

[mlir][IR] Move the remaining builtin attributes to ODS.
ClosedPublic

Authored by rriddle on Mar 11 2021, 6:10 PM.

Details

Summary

With this revision, all builtin attributes and types will have been moved to the ODS generator.

Depends On D98473

Diff Detail

Event Timeline

rriddle created this revision.Mar 11 2021, 6:10 PM
rriddle requested review of this revision.Mar 11 2021, 6:10 PM
antiagainst accepted this revision.Mar 12 2021, 7:35 AM
This revision is now accepted and ready to land.Mar 12 2021, 7:35 AM
This revision was automatically updated to reflect the committed changes.

This change broke the mlir-nvidia bot, you didn't get an email notification for this?

It seems that the issue is with the Python bindings which are exercising recovering from a getChecked() test.

The test does:

try:
  fattr_invalid = FloatAttr.get(
      IntegerType.get_signless(32), 42)
except ValueError as e:
  # CHECK: invalid 'Type(i32)' and expected floating point type.
  print(e)

But now it asserts:

mlir/include/mlir/IR/Types.h:243: U mlir::Type::cast() const [U = mlir::FloatType]: Assertion `isa<U>()' failed.
Aborted

I think this is what is fixed in https://reviews.llvm.org/D98764 ; but I'm curious why it was broken in this patch and if there are other "demon" hidden in here?