[all-commits] [llvm/llvm-project] dc5d67: [mlir][python] Register linalg.ElementwiseOp wrapp...
Maksim Levental via All-commits
all-commits at lists.llvm.org
Wed Sep 16 05:19:44 PDT 2026
Branch: refs/heads/users/makslevental/fix-linalg-elemwise
Home: https://github.com/llvm/llvm-project
Commit: dc5d67c1c1984b2950939f3a53e4e2bda38d9de0
https://github.com/llvm/llvm-project/commit/dc5d67c1c1984b2950939f3a53e4e2bda38d9de0
Author: makslevental <maksim.levental at gmail.com>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M mlir/python/mlir/dialects/linalg/__init__.py
M mlir/test/python/dialects/linalg/ops.py
Log Message:
-----------
[mlir][python] Register linalg.ElementwiseOp wrapper as op view
The hand-written ElementwiseOp wrapper subclassed the generated OpView but
was not registered in the op-view registry, so ops reconstructed from the
registry (e.g. Operation.opview) were instances of the generated base class
rather than the publicly exported subclass. This made
isinstance(op.opview, linalg.ElementwiseOp) and match/case dispatch return
False for real linalg.elementwise ops.
Register the wrapper with replace=True (as pdl.py does) so the exported
class is the one the registry instantiates.
Fixes #223673
Commit: 60fc5b53085c3304a9e76e890abe8441da32c92a
https://github.com/llvm/llvm-project/commit/60fc5b53085c3304a9e76e890abe8441da32c92a
Author: makslevental <maksim.levental at gmail.com>
Date: 2026-09-16 (Wed, 16 Sep 2026)
Changed paths:
M mlir/test/python/dialects/linalg/ops.py
Log Message:
-----------
Remove comment per review
Compare: https://github.com/llvm/llvm-project/compare/2d7343a53ba6...60fc5b53085c
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list