Hereby the meeting notes from this Wednesday’s Tensor Compiler Design Group meeting, September 17th.
17th September 2025
Attendees
@banach-space @sjarus @dcaballe @Groverkss @kuhar @qed @jpienaar
Topics
ConvertVectorToLLVM
Is it intended as the “always functional and optimal” lowering path from Vector to LLVM?
- No. Historically, it was added as the very final step for lowering/converting from Vector to LLVM, i.e. a thin and relatively simple layer.
- Over time, it has grown organically and has become much more powerful. It feels that we should revisit and re-define its scope.
- While some users might be using it in production as the lowering pipeline from Vector to LLVM, this is not recommended. Folks present in the call build their own custom lowering pipelines. In general, we expect that other users should as well (to match the needs of their hardware).
- To make users of
ConvertVectorToLLVMmore informed, we should remove all the default lowering paths (e.g., forvector.contract,vector.transpose) so that every user makes an optimal decision based on their needs. Alternatively, we can improve documentation.
Linearisation/Flattening and Unrolling
For context, see the discussion here: PR #151175.
Should “unrolling” be the de-facto legalisation path from Vector to LLVM + SPIR-V?
- Not all ops can be flattened (e.g.,
vector.transfer_readandvector.transfer_write), but all ops can be unrolled. - Unrolling is not always the optimal choice, and often users will want to mix and match based on their targets.
- For some users, flattening is in fact sufficient (e.g. Diego).
- All in all, it feels that we should support customisation rather than enforce a specific path (i.e., treat “flattening” and “unrolling” as parallel techniques).
Requirements for New Vector Ops
- Request from Kunwar: we should document requirements for new
Vectordialect ops, e.g., “For an op to support lowering to LLVM (or SPIR-V), it is required that the following passes are implemented.” - This may effectively mean that we prioritise “unrolling” over “flattening.”
Action Items
- Audit
ConvertVectorToLLVMand remove defaults. Require users to customise the pipeline whenever more than one option exists. Alternatively, improve documentation. - Work towards customisation of the Vector lowering pipeline - users should have the necessary means to configure it as they need.
- Improve the documentation for flattening/linearisation and unrolling - clarify the limitations and trade-offs. Users should be able to choose whichever works best for them.
- Require all new Vector ops to implement unrolling.
Final points
@attendees, thank you for participating
Please leave comments if I missed or misinterpreted anything.
-Andrzej