8000 bounds inference (mod) pessimistic on unsigned 0 interval by rootjalex · Pull Request #5350 · halide/Halide · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bounds inference (mod) pessimistic on unsigned 0 interval #5350

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

Merged
merged 2 commits into from
Oct 14, 2020

Conversation

rootjalex
Copy link
Member

Fix discussed with @abadams and @alexreinking . Original code takes b = [0u, 0u] and produces an interval of [0, b.type().max()] due to wrap-around. Technically correct but pessimistic/not tight. This fix removes that case and simplifies the overall generated expression interval.max by removing the max()

@alexreinking alexreinking requested a review from abadams October 12, 2020 20:22
@alexreinking alexreinking added the enhancement New user-visible features or improvements to existing features. label Oct 12, 2020
@rootjalex rootjalex changed the title move conditions to catch unsigned interval >= 1 case first bounds inference (mod) pessimistic on unsigned 0 interval Oct 12, 2020
@alexreinking alexreinking added this to the v11.0.0 milestone Oct 12, 2020
@steven-johnson
Copy link
Contributor

Only failure is unrelated LLVM breakage, good to land

@abadams abadams merged commit 2531d11 into halide:master Oct 14, 2020
@abadams abadams added the backport me This change should be backported to release versions label Oct 14, 2020
@alexreinking alexreinking modified the milestones: v11.0.0, v10.0.1 Oct 16, 2020
alexreinking pushed a commit that referenced this pull request Oct 16, 2020
* move conditions to catch unsigned interval >= 1 case first

* use is_int_or_uint()
@alexreinking alexreinking removed the backport me This change should be backported to release versions label Oct 16, 2020
alexreinking pushed a commit that referenced this pull request Oct 18, 2020
* move conditions to catch unsigned interval >= 1 case first

* use is_int_or_uint()
@rootjalex rootjalex deleted the ajr-mod-fix branch November 10, 2020 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New user-visible features or improvements to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0