This is an archive of the discontinued LLVM Phabricator instance.

Add FunctionType to MLIR C and Python bindings.
ClosedPublic

Authored by stellaraccident on Sep 28 2020, 7:28 AM.

Details

Reviewers
ftynse
zhanghb97

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2020, 7:28 AM
stellaraccident requested review of this revision.Sep 28 2020, 7:28 AM
ftynse accepted this revision.Sep 28 2020, 9:30 AM
ftynse added inline comments.
mlir/lib/CAPI/IR/StandardTypes.cpp
321–335 ↗(On Diff #294694)

Nit: consider adding explicit casts between signed (intptr_t) and unsigned integers to avoid warnings.

This revision is now accepted and ready to land.Sep 28 2020, 9:30 AM

Address comments.

stellaraccident marked an inline comment as done.Sep 28 2020, 9:55 AM
zhanghb97 added inline comments.Sep 28 2020, 8:30 PM
mlir/lib/Bindings/Python/IRModules.cpp
1316

I notice that some def/def_static take py::arg, while others don't take. When do we need to use py::arg? What is the purpose of using py::arg?

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

It is generally a good idea to include py::arg wherever there is an API where people may want to invoke things with keywords or have other hints to that effect (i.e. most of them). Any that are missing should not be considered intentional unless if it is a purely positional/internal/dunder API.