Skip to content

[Codegen][Tuner] expose python binding for attention op details - #21170

Merged
bangtianliu merged 3 commits into
iree-org:mainfrom
bangtianliu:attention_op_detail
Jun 25, 2025
Merged

bangtianliu merged 3 commits into
iree-org:mainfrom
bangtianliu:attention_op_detail

Conversation

@bangtianliu

@bangtianliu bangtianliu commented Jun 24, 2025 •

Copy link
Copy Markdown
Contributor

This PR introduces a new Python binding get_attention_op_detail for the function mlir::iree_compiler::IREE::LinalgExt::AttentionOpDetail::get( QMap, KMap, VMap, OMap), which infers the logical structure of an attention operation (e.g., batch/m/k1/k2/n/domain_rank) from its affine indexing maps.

This PR will enable tuner to reason about attention ops more easily.

@bangtianliu
bangtianliu requested a review from benvanik as a code owner June 24, 2025 05:47
@bangtianliu
bangtianliu requested review from Max191 and kuhar June 24, 2025 05:51
@bangtianliu
bangtianliu force-pushed the attention_op_detail branch from d81904d to 9079bf5 Compare June 24, 2025 15:51
@bangtianliu
bangtianliu requested a review from kuhar June 24, 2025 20:42
@bangtianliu
bangtianliu force-pushed the attention_op_detail branch 3 times, most recently from ecef952 to 6c79a3c Compare June 24, 2025 22:02
Signed-off-by: Bangtian Liu <[email protected]>
@bangtianliu
bangtianliu merged commit d867a94 into iree-org:main Jun 25, 2025
bangtianliu added a commit to nod-ai/amd-shark-ai that referenced this pull request Jul 2, 2025
After iree-org/iree#21170 and
iree-org/iree#21216 exposing python bindings
from iree side, This PR adds parser for attention op.

---------

Signed-off-by: Bangtian Liu <[email protected]>
rkayaith pushed a commit to rkayaith/shark-ai that referenced this pull request Aug 19, 2025
After iree-org/iree#21170 and
iree-org/iree#21216 exposing python bindings
from iree side, This PR adds parser for attention op.

---------

Signed-off-by: Bangtian Liu <[email protected]>
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
This PR introduces a new Python binding `get_attention_op_detail` for
the function
`mlir::iree_compiler::IREE::LinalgExt::AttentionOpDetail::get(
QMap, KMap, VMap, OMap)`, which infers the logical structure of an
attention operation (e.g., batch/m/k1/k2/n/domain_rank) from its affine
indexing maps.
 
 This PR will enable tuner to reason about attention ops more easily.

---------

Signed-off-by: Bangtian Liu <[email protected]>
RattataKing pushed a commit to nod-ai/amd-shark-ai that referenced this pull request Mar 2, 2026
After iree-org/iree#21170 and
iree-org/iree#21216 exposing python bindings
from iree side, This PR adds parser for attention op.

---------

Signed-off-by: Bangtian Liu <[email protected]>
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.

3 participants