Skip to content
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

[ARITH] Improve vector simplification for float operands #6043

Merged
merged 8 commits into from
Jul 16, 2020

Conversation

merrymercy
Copy link
Member

No description provided.

src/arith/pattern_match.h Outdated Show resolved Hide resolved
src/arith/pattern_match.h Outdated Show resolved Hide resolved
src/arith/pattern_match.h Outdated Show resolved Hide resolved
@@ -133,6 +135,7 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const AddNode* op) {
TVM_TRY_REWRITE(ramp(b1, s1, lanes) + broadcast(x, lanes), ramp(b1 + x, s1, lanes));
TVM_TRY_REWRITE(broadcast(x, lanes) + ramp(b1, s1, lanes), ramp(x + b1, s1, lanes));
TVM_TRY_REWRITE(broadcast(x, lanes) + broadcast(y, lanes), broadcast(x + y, lanes));
TVM_TRY_REWRITE_IF(x + broadcast(c4, lanes), x, std::fabs(c4.Eval()->value) < 1e-20);
Copy link
Member

Choose a reason for hiding this comment

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

can we simply use equal instead if we just want to check 0?

src/arith/pattern_match.h Outdated Show resolved Hide resolved
@tqchen tqchen merged commit 30415e5 into apache:master Jul 16, 2020
@merrymercy merrymercy deleted the pr-fix-float-simplification branch July 16, 2020 20:58
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Aug 26, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Sep 2, 2020
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