Skip to content

WIP: Explore reshape-aware dynamic padding buckets - #32

Draft
stevenvar wants to merge 5 commits into
steven.tile-targeted-compile-time-guardfrom
steven.dynamic-padding-alignment-wip
Draft

WIP: Explore reshape-aware dynamic padding buckets#32
stevenvar wants to merge 5 commits into
steven.tile-targeted-compile-time-guardfrom
steven.dynamic-padding-alignment-wip

Conversation

@stevenvar

@stevenvar stevenvar commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Summary

This WIP explores padding dynamic input dimensions while preserving divisibility requirements used by internal shape expressions.

Dynamic padding buckets inspect dynamic Reshape output expressions and align the selected compile batch with their constant divisors. For example, an internal A / 12 reshape selects 384 rather than 512 for a runtime value of 300.

Tests

  • Checks the existing next-power-of-two behavior without alignment.
  • Checks that A / 12 selects divisible buckets.
  • Checks that independent divisors such as 12 and 18 are combined.

WIP limitations

The prototype currently scans the cluster function during compilation and only reads Reshape output-shape expressions. Before making this ready, the analysis should be computed once during clustering and stored as cluster metadata. It also needs a more general treatment of shape-derived value paths such as Shape -> arithmetic -> Fill/Tile.

@stevenvar stevenvar changed the title WIP: Preserve reshape divisibility in dynamic padding buckets WIP: Explore safe dynamic padding and static singleton compilation Jul 31, 2026
@stevenvar
stevenvar force-pushed the steven.dynamic-padding-alignment-wip branch 3 times, most recently from 98abd71 to 40ce995 Compare July 31, 2026 16:28
@stevenvar stevenvar changed the title WIP: Explore safe dynamic padding and static singleton compilation WIP: Explore reshape-aware dynamic padding buckets Jul 31, 2026
@stevenvar
stevenvar force-pushed the steven.tile-targeted-compile-time-guard branch 7 times, most recently from ffee85a to b072b26 Compare August 14, 2026 16:02
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