This is an archive of the discontinued LLVM Phabricator instance.

Extend PyConcreteType to support intermediate base classes.
ClosedPublic

Authored by stellaraccident on Sep 6 2020, 12:09 PM.

Details

Summary
  • Resolves todos from D87091.
  • Also modifies PyConcreteAttribute to follow suite (should be useful for ElementsAttr and friends).
  • Adds a test to ensure that the ShapedType base class functions as expected.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptSep 6 2020, 12:09 PM
stellaraccident requested review of this revision.Sep 6 2020, 12:09 PM

There are redundant init implementations for PyRankedTensorType and PyUnrankedTensorType (see inline comments).

mlir/lib/Bindings/Python/IRModules.cpp
635

I think the init step is a redundant implementation of the step in bind method (line 335).
Should we just leave the init step in the bind method like other bindDerived methods?

667

Ditto on redundant init implementation.

Address comments and rebase.

There are redundant init implementations for PyRankedTensorType and PyUnrankedTensorType (see inline comments).

Indeed - I missed those. Removed and rebased. PTAL.

zhanghb97 accepted this revision.Sep 6 2020, 11:06 PM

Thanks for extending the PyConcreteType!

This revision is now accepted and ready to land.Sep 6 2020, 11:06 PM
This revision was landed with ongoing or failed builds.Sep 6 2020, 11:40 PM
This revision was automatically updated to reflect the committed changes.