Skip to content

[schedule][mlir] consumer fusion - #112

Open
liamsemeria wants to merge 1 commit into
xtc-tools:mainfrom
liamsemeria:dev/sliam/mlir-fuse-consumer
Open

[schedule][mlir] consumer fusion#112
liamsemeria wants to merge 1 commit into
xtc-tools:mainfrom
liamsemeria:dev/sliam/mlir-fuse-consumer

Conversation

@liamsemeria

@liamsemeria liamsemeria commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Motivation

Adds consumer fusion to the mlir backend.

Description

Implements fuse_consumer_at() for the mlir backend, the main use case being fusing relus that come after matmuls or conv2ds. It makes use of the new xtc-mlir python bindings, and a new xtc-mlir transform op FuseConsumerOp.

It only works when using the tensor dialect, the same as producer fusion.

Originally it took the name of the consumer as input, but I modified it to only fuse the first output to match how the tvm fuse_consumer_at is being implemented.

@liamsemeria liamsemeria added the enhancement New feature or request label Aug 4, 2026
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.92857% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/xtc/backends/mlir/MlirCompilerPasses.py 82.35% 2 Missing and 7 partials ⚠️

📢 Thoughts on this report? Let us know!

@liamsemeria
liamsemeria force-pushed the dev/sliam/mlir-fuse-consumer branch 2 times, most recently from 07f8b08 to 5f3b31b Compare August 13, 2026 08:10
@liamsemeria
liamsemeria requested a review from guillon August 13, 2026 08:21
Comment thread src/xtc/backends/mlir/MlirCompilerPasses.py Outdated

@qaco qaco left a comment

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.

Great

Comment thread src/xtc/backends/mlir/MlirCompilerPasses.py Outdated
Comment thread src/xtc/backends/mlir/MlirCompilerPasses.py Outdated

@qaco qaco left a comment

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.

Great work, thanks for doing this! See the requested changes above

@liamsemeria
liamsemeria force-pushed the dev/sliam/mlir-fuse-consumer branch from 5f3b31b to 1e89dc9 Compare September 3, 2026 12:24
@liamsemeria
liamsemeria requested a review from qaco September 3, 2026 12:47

@guillon guillon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fine for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants