Several of us met earlier today as an offshoot of the thread about installing and releasing Python-based MLIR projects. Here are some rough notes and outcomes (from memory - please correct if mis-stated).
Attendees:
Notes:
-
General Discussion:
- Treat installing/release as a supply chain problem: there are a lot of ways people downstream will need to assemble things, and it is best if the project provides the components for these to happen and has the right divisions in place for know possibilities.
- Especially when considering Windows, forethought is needed since not all paths are tractable ~months down the road.
- Agreement that the baseline support needed for Python deployability of core and dependent python projects is to install the C++ deps (headers/libs) needed to build the dependent project into the dist directory of the upstream project alongside the installed python sources/extensions.
- Different release channels (OS packaging, Anaconda, etc) can specialize from there with various system packaging approaches, but this kind of baseline setup can be a good starting point for the core project, leaving differentiation to others.
- The Swift side may need to solve the OS-package situation at the get-go.
-
Topic: Improvements to MLIR installability
-
ninja install-mlir
should work - It would be nice to extricate MLIR from its current nesting as an “LLVM Tool” (groups it under installation for other tools which are unrelated)
- Not fundamentally “hard” but the last time ~an hour was taken on this, it was more than a quick thing.
- Likely needs some other CMake attention.
- Several things need this worked out in the mid-term (@badenh by ~Feb, me in the next few months)
- @marbre going to look at this
-
-
Topic: Shared library rework
- Options include:
a. Do nothing: likely difficult for downstream projects to add components to increasingly monolithic shared libraries.
b. UseBUILD_SHARED_LIBS
mode: Every CMake library becomes a shared library.
c. Design the shared library boundaries: Treat shared libraries as a key part of the API and draw the boxes around the intersections that make sense as usable components and dependencies. - For (b) this is really mostly a developer feature at present. Might be worth “productionizing” slightly as it is the lowest friction path to get something working (i.e. “If I had a weekend to do this, I’d just use that”). Doesn’t work on Windows today but could probably be made to after a fashion.
- For (c), this is the canonical way that a project is a good shared library citizen.
- If drawing the boxes they might include the following breakdowns:
- MLIR:
-
core
: IR, Transforms, maybe standard dialect - Library per dialect
- Execution engine, runners, etc
-
- LLVM: Likely need to create dedicated librarys for
Support
/ADT
and demangle.
- MLIR:
- If could be split in this way, MLIR
core
would not depend on any of the heavy parts of LLVM. - Discussed seeing if we could do the CMake plumbing for the LLVM Support library first and see if there is a pattern there that could be applied to the rest. (correct if wrong) @marbre expressed he might be able to look at this.
- Stella may look at some work to make
BUILD_SHARED_LIBS
usable beyond dev/across projects as a stop-gap.
- If drawing the boxes they might include the following breakdowns:
- Options include:
-
Next step: A followup meeting before the end of year would be good. Someone not-Stella should speak up and organize.