-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Analyzer] Enhance ConstIntBoundAnalyzer and IntervalSet with modular set analysis #18330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
LeiWang1999
commented
Sep 21, 2025
- 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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
@LeiWang1999 would be great to followup on the notes and get it in |
@tqchen sure, sorry for the delay. I'll work on this tomorrow. |
@tvm-bot rerun |