This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][python bindings] Add more basic AttrBuilder for _ops_gen.py files
ClosedPublic

Authored by HarmonyHu on May 17 2023, 12:12 AM.

Details

Summary

Add more attribute builders, such as "F32Attr", "F64Attr" and "F64ArrayAttr", which are useful to create operations by python bindings. For example, tosa.clamp in _tosa_ops_gen.py need 'F32Attr'.

Diff Detail

Event Timeline

HarmonyHu created this revision.May 17 2023, 12:12 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2023, 12:12 AM
HarmonyHu requested review of this revision.May 17 2023, 12:12 AM
ftynse accepted this revision.May 17 2023, 7:42 AM

Can we add some tests for these?

This revision is now accepted and ready to land.May 17 2023, 7:42 AM
HarmonyHu updated this revision to Diff 523247.EditedMay 17 2023, 8:25 PM

Add unit test for attribute builders.
Please help me to commit this patch if accepted, as it's my first contribution to LLVM.

HarmonyHu requested review of this revision.May 18 2023, 2:09 AM
HarmonyHu updated this revision to Diff 523300.May 18 2023, 2:35 AM
This revision was not accepted when it landed; it landed in state Needs Review.May 22 2023, 9:38 AM
This revision was automatically updated to reflect the committed changes.