-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Adapt to dim expr #60843
Adapt to dim expr #60843
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
0236f29
to
d9f068f
Compare
d9f068f
to
d8d4091
Compare
d8d4091
to
247baa8
Compare
paddle/cinn/common/ir_util.cc
Outdated
for (int i = 0; i < shape.size(); i++) { | ||
CHECK_EQ(shape[i].type(), Int(32)); | ||
CHECK(shape[i].type() == Int(64) || shape[i].type() == Int(32)); |
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.
Add hint message for check error?
paddle/cinn/ir/ir.cc
Outdated
auto type = vs.front().type(); | ||
for (auto &v : vs) CHECK_EQ(v.type(), type) << vs.front() << " " << v; | ||
for (auto &v : vs) { | ||
CHECK_EQ(v.type(), type) << "(" << v << " vs " << vs.front() << ")"; |
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.
Add some English hint for what's wrong here.
} else { | ||
dims.emplace_back(_axis_with_reduce[i]->name, | ||
Expr(0), | ||
Sub::Make(dim, cinn::common::make_const(1))); |
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.
Should we make "make_const" with type template? Now it seems make_const only returns int32
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 code is intended to be compatible with previous int32,
and if you pass the shape property through dim_expr, you will not enter this branch of the code.
@@ -61,8 +61,35 @@ std::string Domain::__str__() const { | |||
} | |||
|
|||
isl::set Domain::to_isl() const { | |||
// TODO(6clc): will be removed in future |
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.
Please delete in the future we found we can get rid of isl
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.
LGTM
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.
LGTM
PR types
Others
PR changes
Others
Description
Pcard-78120
In the check for Int32, insert TryElevateInt32ToInt64(). This function checks the data type of ir and raises it to int64 if an expression contains an Int64.
int64 is imported only with shape expressions passed in by dim_expr.