-
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
Track likely values through lets in loop partitioning #7930
Conversation
Fixes #7929 Improves runtime of lens_blur app by ~20%
Now that we look through lets, we end up in more situations where both sides have a captured likely.
src/BoundaryConditions.cpp
Outdated
clamp(likely(arg_var), min, min + extent - 1)); | ||
likely(clamp(likely(arg_var), min, min + extent - 1))); | ||
|
||
// We want loop partitioning to both cause the clamp to go away, and |
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.
This comment seems to be after the line it explains.
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.
Also, it would be great if the comment explained why two likely tags cause it to go away.
|
||
namespace Halide { | ||
namespace Internal { | ||
|
||
/** Return true if an expression uses a likely tag that isn't captured | ||
* by an enclosing Select, Min, or Max. */ | ||
bool has_uncaptured_likely_tag(const Expr &e); | ||
bool has_uncaptured_likely_tag(const Expr &e, const Scope<> &scope); |
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.
The comments need to be updated to say that the scope is for variables of lets which has likely tag in them.
ptal |
* Track likely values through lets in loop partitioning Fixes halide#7929 Improves runtime of lens_blur app by ~20% * Add uncaptured likely tags to selects in boundary condition helpers Now that we look through lets, we end up in more situations where both sides have a captured likely. * Better comments
Fixes #7929
Improves runtime of lens_blur app by ~20%