Skip to content

[python] Set up python binding for matcher convolution and attention op#22311

Merged
bangtianliu merged 1 commit into
iree-org:mainfrom
bangtianliu:new_transform_python_bindings
Oct 15, 2025
Merged

[python] Set up python binding for matcher convolution and attention op#22311
bangtianliu merged 1 commit into
iree-org:mainfrom
bangtianliu:new_transform_python_bindings

Conversation

@bangtianliu

@bangtianliu bangtianliu commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

This PR extends the preprocessing transform dialect Python bindings by adding MatchConvolutionOp and MatchAttentionOp, completing the matcher operation API suite started in #22227.

Motivation
Completes the Python binding API for all preprocessing transform matcher operations, enabling SHARK Tuner to programmatically generate Transform Dialect specs for convolutions and attention operations in addition to contractions. This removes the need for string-based spec generation and improves type safety and maintainability.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
@bangtianliu bangtianliu requested review from Max191 and kuhar October 15, 2025 02:48
@bangtianliu

bangtianliu commented Oct 15, 2025

Copy link
Copy Markdown
Contributor Author

I've combined MatchConvolutionOp and MatchAttentionOp in the current PR since they follow the same pattern as MatchContractionOp from #22227, and the implementation for each is relatively straightforward.

But I am also happy to split this into two separate PRs if preferred.

@bangtianliu bangtianliu merged commit 9fdd3dd into iree-org:main Oct 15, 2025
45 checks passed
weidel-p pushed a commit to weidel-p/iree that referenced this pull request Oct 21, 2025
…op (iree-org#22311)

This PR extends the preprocessing transform dialect Python bindings by
adding `MatchConvolutionOp `and `MatchAttentionOp`, completing the
matcher operation API suite started in iree-org#22227.

**Motivation** 
Completes the Python binding API for all preprocessing transform matcher
operations, enabling SHARK Tuner to programmatically generate Transform
Dialect specs for convolutions and attention operations in addition to
contractions. This removes the need for string-based spec generation and
improves type safety and maintainability.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
Signed-off-by: Philipp <philipp.weidel@intel.com>
bangtianliu added a commit to nod-ai/amd-shark-ai that referenced this pull request Oct 23, 2025
This PR uses python binding to build td specs for convolution op.
The python binding is exposed from IREE PR
iree-org/iree#22311.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
bangtianliu added a commit to nod-ai/amd-shark-ai that referenced this pull request Oct 27, 2025
This PR uses python binding to build td specs for attention op. The
python binding is exposed from IREE PR
iree-org/iree#22311.

All the temporary solution code and string-based spec generation code
have been removed, now SpecBuilder class can be used to build td spec
using python bindings.

---------

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
RattataKing pushed a commit to RattataKing/amd-shark-ai that referenced this pull request Nov 4, 2025
This PR uses python binding to build td specs for attention op. The
python binding is exposed from IREE PR
iree-org/iree#22311.

All the temporary solution code and string-based spec generation code
have been removed, now SpecBuilder class can be used to build td spec
using python bindings.

---------

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
pstarkcdpr pushed a commit to pstarkcdpr/iree that referenced this pull request Nov 28, 2025
…op (iree-org#22311)

This PR extends the preprocessing transform dialect Python bindings by
adding `MatchConvolutionOp `and `MatchAttentionOp`, completing the
matcher operation API suite started in iree-org#22227.

**Motivation** 
Completes the Python binding API for all preprocessing transform matcher
operations, enabling SHARK Tuner to programmatically generate Transform
Dialect specs for convolutions and attention operations in addition to
contractions. This removes the need for string-based spec generation and
improves type safety and maintainability.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
RattataKing pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Mar 2, 2026
This PR uses python binding to build td specs for convolution op.
The python binding is exposed from IREE PR
iree-org/iree#22311.

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
RattataKing pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Mar 2, 2026
This PR uses python binding to build td specs for attention op. The
python binding is exposed from IREE PR
iree-org/iree#22311.

All the temporary solution code and string-based spec generation code
have been removed, now SpecBuilder class can be used to build td spec
using python bindings.

---------

Signed-off-by: Bangtian Liu <liubangtian@gmail.com>
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.

2 participants