This is an archive of the discontinued LLVM Phabricator instance.

WIP: [mlir][transform][python] Test that mix-ins stay in sync with tablegen.
Needs ReviewPublic

Authored by ingomueller-net on Aug 29 2023, 7:51 AM.

Details

Summary

Mix-in classes of the Python bindings have the risk of running out of
sync with respect to the tablegen definition of their underlying op. If
that op gets new parameters or required parameters are renamed, existing
test cases usually don't break. This patch creates a helper that allows
to print the parameters of the generated base classes such that they can
be CHECKed in the corresponding tests.

I have only currently added such a test for one op to gather feedback
and plan to add more tests once I see people like the idea.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2023, 7:51 AM
ingomueller-net requested review of this revision.Aug 29 2023, 7:51 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 29 2023, 7:51 AM
  • Add file I forgot to add in the initial revision.