-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Specialize does not remove select conditions as expected #8443
Comments
@abadams Could this simplifier rule be the blame? Line 75 in 72749c5
In the sense that the assumption added by specializing is simplified to this |
hi @mcourteaux , specialize with Generator output with
|
I simplified this example a bit further into:
The issue is essentially what @mcourteaux suspected. When we transform
Spoke too soon-- removing that rule does result in specialize doing the right thing for the modified even simpler version above. |
The rule is good, so learn_true needs to understand min(...) > constant, or specializations should be resolved before the simplifier gets a turn at it. |
Yeah, I think we should guarantee that syntactic matches between |
When trying to specialize the conditions of a nested
select
, Halide cannot remove select within the specialization as expected.In the generated stmt file, the specialize condition in the outer if/else branch is rewritten into something different than the select condition.
I'm using Halide 18.0.0 on Mac M2.
Here's a minimal generator example:
Here's part of the generated stmt.
The text was updated successfully, but these errors were encountered: