Details
- Reviewers
mehdi_amini - Commits
- rGc20c1960c15a: Add Python bindings guide.
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/docs/Bindings/Python.md | ||
---|---|---|
33 | Can this default to python3? | |
64 | Nit: registerAllDialects is a free function and not a global initializer. There aren't any global initializers in mlir/lib | |
89 | (same as above: there aren't any global init in MLIR core) | |
175 | Can you add an example here? | |
181 | Can you make "doctest" a link to a doc about it? I don't assume everyone to be familiar with the python usual way of doing things. Edit: actually just a link to the "Testing" section below. | |
300 | Seems like something we don't want to repeat in every single file? |
Comments.
mlir/docs/Bindings/Python.md | ||
---|---|---|
33 | Not reliably at present. This actually is already in the cmake cache due to other things auto-detecting it for lit and such. Also, what the python executable is called is very OS/install dependent. For example, many Linuxes differentiate 'python3' from 'python' (2), but default installs on Windows will typically only provide 'python' (3). I foresee needing to rework the detection rules and make them specific to building the python bindings (versus conflating general access to the python interpreter with the version used for headers/libs, but that will require some surgery on various CMake files to get right (i.e. it is common in various multi-python build docker images to have a bunch of python installs and you want to generate shared objects for each version). As such, I see this current state as temporary and ok for now. | |
64 | Rephrased: it is more about implying linkage of potentially optional components vs a concept of global constructor/initializer. | |
175 | Added a blurb/link to pep8. | |
300 | Added a TODO to create a test utility class once we have anything that exists. |
Can this default to python3?