Repository navigation
[LLVM] Bump to fe36473cb - #685
Merged
Merged
Conversation
The LLVM bump changed two things the extras tests depend on:
- transform op attributes now print as inherent properties (`<...>`)
instead of a discardable attr-dict (`{...}`): transform.get_parent_op,
transform.loop.unroll, and transform.structured.bufferize_to_allocation.
Update the golden IR in test_transform.py accordingly.
- The linalg named ops were removed upstream (llvm/llvm-project#220916,
#220912, #220905) in favor of the generic linalg.elementwise op with a
`kind` attribute. Point the eudsl `linalg.add` wrapper at
linalg.elementwise(kind=add) and update the linalg CHECK lines.
Upstream removed the linalg unary/binary named ops and the transposed/ unsigned matmul variants (llvm/llvm-project#220905, #220912, #220916). Port every affected wrapper in mlir/extras/dialects/linalg.py: - unary (abs, ceil, exp, floor, log, negf) and binary (add, sub, mul, div, div_unsigned, max) now emit linalg.elementwise with the matching kind (max -> max_signed). - elemwise_unary/elemwise_binary route to linalg.elementwise with a `fun` kind (defaulting to exp/add to match the removed generic ops). - matmul_transpose_a/b and batch_matmul_transpose_a/b now emit the generic linalg.matmul / batch_matmul with transposed indexing maps; matmul_unsigned uses cast=cast_unsigned. Add tests/dialect/test_linalg.py coverage exercising each rewritten wrapper (none existed before).
…fineMapAttr The AffineMapArrayAttr attr-builder wraps each element in AffineMapAttr itself, so passing pre-wrapped AffineMapAttr raised TypeError. Verified locally against the fe36473 bindings + FileCheck (all 11 test_linalg tests pass).
Comment on lines
+209
to
+212
| # linalg.elemwise_binary was removed; linalg.elementwise (with a binary | ||
| # `kind`) is the replacement. Default to `add` to match the old op default. | ||
| if fun is None: | ||
| fun = linalg.ElementwiseKind.add |
Contributor
There was a problem hiding this comment.
remove this and make fun required
Contributor
There was a problem hiding this comment.
Done in f90f045 — fun is now a required keyword arg (dropped the exp/add defaults).
Comment on lines
+217
to
+220
| # linalg.elemwise_unary was removed; linalg.elementwise (with a unary | ||
| # `kind`) is the replacement. Default to `exp` to match the old op default. | ||
| if fun is None: | ||
| fun = linalg.ElementwiseKind.exp |
Contributor
There was a problem hiding this comment.
remove this and make fun required
Contributor
There was a problem hiding this comment.
Done in f90f045 — fun is now a required keyword arg (dropped the exp/add defaults).
Address review: drop the default kind (exp/add) and require the caller to pass `fun` explicitly.
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.
Bump LLVM to llvm/llvm-project@fe36473cb