Skip to content

Conversation

LeiWang1999
Copy link
Contributor

  • Added modular set analysis to ConstIntBoundAnalyzer for tighter bounds when min_value equals max_value.
  • Introduced ComputeGCD function to calculate the GCD of two integers.
  • Updated Combine functions in IntervalSet to accept operation nodes for better type handling.
  • Enhanced tests for modular set bounds in both const integer bounds and interval sets.

- Added modular set analysis to ConstIntBoundAnalyzer for tighter bounds when min_value equals max_value.
- Introduced ComputeGCD function to calculate the GCD of two integers.
- Updated Combine functions in IntervalSet to accept operation nodes for better type handling.
- Enhanced tests for modular set bounds in both const integer bounds and interval sets.
if (b.min_value > 0) {
int64_t b_max_cap = InfAwareAdd(b.max_value, -1);
// Try to get tighter bounds using modular set information
if (parent_ && b.min_value == b.max_value) {
Copy link
Member

Choose a reason for hiding this comment

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

if we have the bound analysis already in IntervalSet, is the const int bound still necessary? just want to get a sense of if we need to introduce tihs bound

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from my understanding, const int bound is faster to analysis, and IntervalSet can build on those constant bounds for further analysis. keeping them separate makes the design clearer in my view.

@tqchen
Copy link
Member

tqchen commented Oct 2, 2025

@LeiWang1999 would be great to followup on the notes and get it in

@LeiWang1999
Copy link
Contributor Author

@tqchen sure, sorry for the delay. I'll work on this tomorrow.

@tqchen
Copy link
Member

tqchen commented Oct 13, 2025

@tvm-bot rerun

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