Skip to content

[LLVM] Bump to fe36473cb - #685

Merged
makslevental merged 5 commits into
mainfrom
update-llvm
Sep 12, 2026
Merged

makslevental merged 5 commits into
mainfrom
update-llvm

Conversation

@bump-llvm

@bump-llvm bump-llvm Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and make fun required

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this and make fun required

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@makslevental
makslevental merged commit a827562 into main Sep 12, 2026
199 of 200 checks passed
@makslevental
makslevental deleted the update-llvm branch September 12, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant