Update LLVM version, 2025 Q4 #2122
Draft
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:
Update llvm, stablehlo and enzyme, 2025 Q4
The latest pair of good versions, indicated by stablehlo, is openxla/stablehlo@0a4440a
For Enzyme, we go to the latest release https://github.com/EnzymeAD/Enzyme/releases/tag/v0.0.203
with commit
476c8e3193a8577ba24ff845ae2294109225f83a
Description of the Change:
llvm-project/mlir/include/mlir/InitAllPasses.h
header no longer includes individual pass headers.To incorporate specific passes, you now need to include either
mlir/Conversion/Passes.h
or the header for each dialect pass. This change stems from the upstream cleanup ofmlir/InitAllDialects.h
, which previously handled these includes. Following the decision from the owner (as seen in this pull request comment: https://github.com/ftynse/water/pull/16/files#r2259526343), we will specifically include each required header, faster compilation (no unnecessary headers). For further context, refer to this PR: [mlir] RelandMove InitAll*** implementation into static library
llvm/llvm-project#151150bufferization::detail::defaultGetBufferType
to beBufferLikeType
instead ofBaseMemRefType
. We aligned the behaviour with the upstream PR, return the BufferLikeType from ourgetBufferType()
implementation as well.elemwise_unary
andelemwise_binary
oflinalg
have been deprecated from the upstream, replaced withelementwise
. [MLIR][Linalg] Remove elemwise_unary and elemwise_binary llvm/llvm-project#147082. Follow this PR, usinglinalg.add
directly.register_all_dialects/passes/extension` should now be configured as a static library in CMake, refer to this PR: [mlir] Reland
Move InitAll*** implementation into static library
llvm/llvm-project#151150{op}::create
method) be added to support the same behaviour ofrewriter.create
method. But it provides a meaningful message when using this new opt-in feature compared torewrite.create
. Since the new generatedcreate
function will call thebuild
function, it requires us to define the instance of the builder (GraidentOps.td
). Refer to the PR: [mlir][tblgen] add concrete create methods llvm/llvm-project#147168.Take
linalg.abs
as an example:EnzymeStatic-21
toEnzymeStatic-22
TODO:
rewrite.create
to{op}::create
Even it’s compatible to the current
rewrite.create
method, we don’t need to change allrewrite.create
to{op}::create
right away, but this new feature provides more friendly development experience. Just for an example: [mlir][core] NFC update builder create API usage llvm/llvm-project#147311Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-100911]
[sc-100912]