This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Limit Python dependency to Development.Module when possible.
ClosedPublic

Authored by mikeurbach on Oct 7 2021, 9:36 PM.

Details

Summary

After CMake 3.18, we are able to limit the scope of the
find_package(Python3 ...) search to just Development.Module. Searching
for Development will fail in manylinux builds, and isn't necessary
since we are not embedding the Python interpreter. For more information, see:
https://pybind11.readthedocs.io/en/stable/compiling.html#findpython-mode

Diff Detail

Event Timeline

mikeurbach created this revision.Oct 7 2021, 9:36 PM
mikeurbach requested review of this revision.Oct 7 2021, 9:36 PM
stellaraccident accepted this revision.Oct 7 2021, 9:40 PM

Nice find!! We should propagate this to downstreams (at least a couple of which already require this version of cmake and don't need the conditional).

This revision is now accepted and ready to land.Oct 7 2021, 9:40 PM

We should propagate this to downstreams (at least a couple of which already require this version of cmake and don't need the conditional).

I will take care of doing this for CIRCT, and tagged Sean for visibility on Torch MLIR.

Thanks Mehdi. I will take a look at that. We also had some issues downstream so I was planning to revert but you beat me to it.