This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Python] Add an Operation.name property
ClosedPublic

Authored by siddharth-krishna on Dec 17 2020, 10:44 AM.

Diff Detail

Event Timeline

siddharth-krishna requested review of this revision.Dec 17 2020, 10:44 AM
mehdi_amini accepted this revision.Dec 17 2020, 11:01 AM
This revision is now accepted and ready to land.Dec 17 2020, 11:01 AM

The build is failing because clang-tidy is complaining about not being able to find pybind.. I don't think this could be caused by my change, could it? This is my first patch to LLVM, so I'd appreciate any help on fixing this. Thanks in advance!

/mnt/disks/ssd0/agent/llvm-project/mlir/lib/Bindings/Python/PybindUtils.h:16:10: error: 'pybind11/pybind11.h' file not found [clang-diagnostic-error]
#include <pybind11/pybind11.h>
         ^

The build is failing because clang-tidy is complaining about not being able to find pybind..

The image deployed to build machines does not have pybind.

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

Nit: please only use auto in cases where it improves readability, e.g. the type is too long to spell out (iterator) or is clear from the RHS (cast result). Here specifically, we don't see what is the result of mlirIdentifierStr so it's hard to locally understand that the ownership management is correct.

Use exact types instead of auto

siddharth-krishna marked an inline comment as done.Dec 18 2020, 12:57 AM

Thanks! That's good to know, I've added the types explicitly. What is the next step for landing this patch?

Thanks - I'll land the patch. (sorry for the delay - I've been offline for holidays)

stellaraccident accepted this revision.Dec 29 2020, 2:09 PM
This revision was landed with ongoing or failed builds.Dec 29 2020, 2:16 PM
This revision was automatically updated to reflect the committed changes.

Thank you! And happy new year to you all. :)