Skip to content

[WIP][LinalgExt] Support iree_linalg_ext.index in attention ops for causal masks#24056

Closed
keshavvinayak01 wants to merge 1 commit intoiree-org:mainfrom
keshavvinayak01:users/keshavvinayak01/causal-index-fuse
Closed

[WIP][LinalgExt] Support iree_linalg_ext.index in attention ops for causal masks#24056
keshavvinayak01 wants to merge 1 commit intoiree-org:mainfrom
keshavvinayak01:users/keshavvinayak01/causal-index-fuse

Conversation

@keshavvinayak01
Copy link
Copy Markdown
Contributor

Express causal masking via iree_linalg_ext.index in the attention region body instead of an is_causal attribute. Decomposition remaps index ops to linalg.index via sMap, and tiling uses.offsets.

Aided by the addition of is_causal to the TMTensor::AttentionOp in llvm/torch-mlir#4520.

… masking

Express causal masking via iree_linalg_ext.index in the attention region
body instead of an is_causal attribute. Teach decomposition to remap
index ops to linalg.index via sMap, and tiling to apply offsets. Detect
causal masks during TMTensor conversion via the is_causal attribute from
llvm/torch-mlir#4520.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha@gmail.com>
@keshavvinayak01 keshavvinayak01 changed the title [LinalgExt] Support iree_linalg_ext.index in attention ops for causal masks [WIP][LinalgExt] Support iree_linalg_ext.index in attention ops for causal masks Apr 8, 2026
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.

1 participant