Skip to content

[2/N Dynamic Shapes]: Support dynamic dims for single-dispatch (zero-workspace) graphs - #399

Merged
sjain-stanford merged 4 commits into
mainfrom
users/sambhav/tensor-dynamic-dims
May 13, 2026
Merged

[2/N Dynamic Shapes]: Support dynamic dims for single-dispatch (zero-workspace) graphs#399
sjain-stanford merged 4 commits into
mainfrom
users/sambhav/tensor-dynamic-dims

Conversation

@sjain-stanford

@sjain-stanford sjain-stanford commented May 7, 2026

Copy link
Copy Markdown
Member

This is the second dynamic-shapes slice. It enables Fusilli graphs to keep representative static extents in TensorAttr while emitting annotated dimensions as dynamic (?) in Torch MLIR types, which lets IREE compile and run zero-transient/single-dispatch dynamic-shape graphs.

This PR covers:

  • per-dimension dynamic-dim metadata on TensorAttr
  • Torch MLIR type emission for dynamic tensor and vtensor dims
  • custom-op placeholder type emission with dynamic tensor dims
  • end-to-end dynamic batch sample coverage for zero-workspace convolution
  • an expected-failure MIN/MAX reduction sample documenting the current dynamic-workspace limitation

Scope and follow-up:

  • Working path: single-dispatch / zero transient workspace cases. This has been tested with batch dynamism on convolution-style cases.
  • Follow-up: dynamic transient workspace size support for multiple-dispatch cases. Those modules expose iree.abi.transients.size and require invoking the runtime size function before execution.

Co-authored-by: GPT 5.5 codex@openai.com

Generated with Codex

@sjain-stanford sjain-stanford changed the title [2/N Dynamic Shapes]: Add dynamic-dim metadata and MLIR type emission [2/N Dynamic Shapes]: Support dynamic dims for zero-workspace graphs May 7, 2026
@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch 2 times, most recently from 4213419 to 235c7db Compare May 7, 2026 22:49
@sjain-stanford sjain-stanford changed the title [2/N Dynamic Shapes]: Support dynamic dims for zero-workspace graphs [2/N Dynamic Shapes]: Support dynamic dims for single-dispatch (zero-workspace) graphs May 7, 2026
@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch 2 times, most recently from d9953f8 to 3002d37 Compare May 8, 2026 00:14
@sjain-stanford
sjain-stanford marked this pull request as ready for review May 8, 2026 00:16
@sjain-stanford
sjain-stanford requested a review from IanWood1 May 8, 2026 00:16
@sjain-stanford

Copy link
Copy Markdown
Member Author

Also, cc: @BrianHarrisonAMD for visibility

@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch from 7f63564 to 852b272 Compare May 8, 2026 05:17
Comment thread include/fusilli/support/asm_emitter.h
Comment thread include/fusilli/node/custom_op_node.h Outdated
Comment thread samples/dynamic_shapes/reduction_min_max_dynamic_batch.cpp
Comment thread include/fusilli/support/asm_emitter.h
@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch from 852b272 to abc7fac Compare May 8, 2026 17:53
@sjain-stanford
sjain-stanford requested a review from IanWood1 May 12, 2026 04:25
@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch from b05b84e to 1132c73 Compare May 12, 2026 23:48
Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu>
Covers the basic MHA SDPA path with dynamic sequence length metadata and keeps the sample expected-fail only on AMDGPU until compiler/runtime support is ready.

Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu>
Emit dynamic custom-op dimension placeholders as question marks and
reject representative unit extents for dynamic dimensions.

Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu>
Signed-off-by: Sambhav Jain <sambhav@alumni.stanford.edu>
@sjain-stanford
sjain-stanford force-pushed the users/sambhav/tensor-dynamic-dims branch from 1132c73 to 2890730 Compare May 12, 2026 23:57
@sjain-stanford
sjain-stanford enabled auto-merge (squash) May 13, 2026 00:02
@sjain-stanford
sjain-stanford disabled auto-merge May 13, 2026 00:50
@sjain-stanford
sjain-stanford merged commit 2e03f7a into main May 13, 2026
16 of 18 checks passed
@sjain-stanford
sjain-stanford deleted the users/sambhav/tensor-dynamic-dims branch May 13, 2026 00:54
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