[LLVM UPDATE] Update LLVM related dependencies Q1 2026#2415
Merged
Conversation
…ype to BufferLikeType
Contributor
Author
|
Note that the CI would not pass until the other dependant PRs targeting this are merged first. |
…#2416) **Context:** llvm/llvm-project#147168 in LLVM adds concrete static methods for operation creation that are attached to the operation instead of the builder. Recently the old `rewriter.create<Op>()` method is [deprecated](llvm/llvm-project#164649). This PR updates operations to utilize static creation methods instead of the deprecated version. **Description of the Change:** - Replaced `rewriter/builder.create<Op>()` with `Op::create(rewriter/builder, ...)` for operations. - Updated the "how to write a pass" tutorial to use the updated creation method. - Changed integer literals in `InsertValueOp::create` calls to `SmallVector<int64_t>` because MLIR introduced `DenseI64ArrayAttr` overloads, creating ambiguity between `ArrayRef<int64_t>` and `DenseI64ArrayAttr` when passing integer literals. **Benefits:** Better autocomplete **Possible Drawbacks:** **Related GitHub Issues:** [sc-107551]
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2415 +/- ##
=======================================
Coverage 96.73% 96.73%
=======================================
Files 156 156
Lines 16921 16921
Branches 1643 1643
=======================================
Hits 16368 16368
Misses 403 403
Partials 150 150 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
paul0403
reviewed
Feb 4, 2026
paul0403
reviewed
Feb 4, 2026
Member
|
After merging, remember to announce in the slack channel the necessary commands for us to update locally, and clear the old versions from the CI cache 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context:
Updating LLVM related dependencies for Q1 2025. After the update we will point the following versions:
Description of the Change:
Replaced rewriter/builder.create() with Op::create(rewriter/builder, ...) for operations. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)
Updated the "how to write a pass" tutorial to use the updated creation method. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)
Changed integer literals in
InsertValueOp::createcalls toSmallVector<int64_t>because MLIR introducedDenseI64ArrayAttroverloads, creating ambiguity betweenArrayRef<int64_t>andDenseI64ArrayAttrwhen passing integer literals. ([LLVM UPDATE] Refactor MLIR operations to use static creation methods #2416)Patched
mlir/llvm-project/mlir/tools/mlir-tblgen/OpPythonBindingGen.cppto avoid the crash when importing the generated python files because JAX's LLVM version is older and doesn’t expose__class_getitem__which causes an error complaining about indexing. see [LLVM UPDATE] Patch MLIR Python generics #2444Remove the xfail for a vmap+grad test that is passing now with the update and move another two xfails inside the tests since they are now segfaulting at runtime. see [LLVM update] Fix CI segfaults in the xfailed grad+vmap tests #2445
Changed
std::nulloptto{}forValueRangedefault arguments because MLIR removed theArrayRef(std::nullopt_t)constructor, requiring empty initializer lists instead. (6b4f790)Added
exactNoneargument toArith_DivSIOppattern because the operation now requires an explicitfastmathattribute parameter in tablegen. (279cefc)Fixed
BufferizableOpInterfaceImpl.cpp: Added explicit cast fromTensorTypetoTensorLikeTypeandBaseMemRefTypetoBufferLikeTypebecause MLIR's bufferization framework now uses theTensorLikeTypeandBufferLikeTypeinterface to support generic tensor/buffer types. (35b5690)Fixed
StringSwitch::Casesusage in to usestd::initializer_listsyntax because LLVM deprecated the oldCasesmethod that took multiple string arguments in favor of a singlestd::initializer_listparameter. (48f97d8)Fixed
inferCanonicalRankReducedResultTypecall from 5 arguments to 3 arguments (87cf94b)Added
StablehloBroadcastLoweringtoCMakeLists.txtbecause StableHLO split broadcast lowering functionality into a separate library (fad13a8)Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-107552] [sc-107551]