Skip to content

mlir-backend: consumer fusion in-place behavior, c target parallelization fix - #159

Merged
liamsemeria merged 2 commits into
xtc-tools:mainfrom
liamsemeria:dev/sliam/mlir-fuse-consumer-in-place-parallel
Oct 22, 2026
Merged

liamsemeria merged 2 commits into
xtc-tools:mainfrom
liamsemeria:dev/sliam/mlir-fuse-consumer-in-place-parallel

Conversation

@liamsemeria

@liamsemeria liamsemeria commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Previously in consumer fusion, a new buffer was created for the conv2d/matmul, instead of the consumer sharing the buffer, and consumer fusion didn't account for parallelized loops.
The c target never ran in parallel since it didnt have the right flag set.

Description

This is mostly just implementing the new feature and fixes that came from the xtc-tools update.
I added a check so that the fopenmp flag is only added when it compiles correctly, if it doesnt then the program just runs sequentially like before. If there is no omp in the c translation the flag does nothing so it's ok to keep.

Discussion

Should there be a logger debug or warning when the fopenmp flag doesn't work or is it ok to keep it like this?

TODO:

  • verify that the c translate parallelization works on mac

@liamsemeria
liamsemeria requested a review from guillon October 15, 2026 10:49
@liamsemeria liamsemeria added the enhancement New feature or request label Oct 15, 2026
@codecov

codecov Bot commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/xtc/utils/ext_tools.py 57.14% 3 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@liamsemeria liamsemeria removed their assignment Oct 22, 2026
@liamsemeria
liamsemeria requested review from guillon and removed request for guillon October 22, 2026 09:52
@liamsemeria
liamsemeria merged commit 43485cc into xtc-tools:main Oct 22, 2026
10 checks passed
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.

2 participants