Skip to content

Conversation

@guan404ming
Copy link
Member

Related

Why

  • Previously only extracted upper bounds, discarding lower bound information
  • Enables better memory planning and optimization with full range [min, max]

How

  • Extract both tir_var_lower_bound and tir_var_upper_bound from PyTorch ExportedProgram.range_constraints
  • Update C++ transforms (static_plan_block_memory.cc, adjust_matmul_order.cc) to use lower bounds
  • Default: lower=0 if not specified, upper=INT64_MAX if not specified

@guan404ming guan404ming force-pushed the add-lower-bound-support branch from 3facc8a to fdabccf Compare November 14, 2025 07:05
@guan404ming guan404ming force-pushed the add-lower-bound-support branch from 9b287af to 7c43afc Compare November 14, 2025 07:46
@guan404ming guan404ming marked this pull request as ready for review November 14, 2025 08:55
@guan404ming
Copy link
Member Author

cc @mshr-h @tlopex

Copy link
Contributor

@mshr-h mshr-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@mshr-h mshr-h merged commit ce0ac66 into apache:main Nov 14, 2025
14 checks passed
@guan404ming
Copy link
Member Author

Thanks!

@guan404ming guan404ming deleted the add-lower-bound-support branch November 14, 2025 12:42
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