-
Notifications
You must be signed in to change notification settings - Fork 553
Add SizeNe
#4338
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
base: master
Are you sure you want to change the base?
Add SizeNe
#4338
Conversation
aa2dce5
to
e78d7c8
Compare
e78d7c8
to
0249d08
Compare
0249d08
to
3592f80
Compare
return dim_node_0->getDynamicValue() != dim_node_1->getDynamicValue() ? 1 : 0; | ||
} | ||
|
||
std::string SizeNe::ToString() const { return "SizeNe"; } |
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.
can you make ToString return "aten::ne_size"? The string has to contain the "aten::ne" otherwise you won't be able to dump the ir of it.
if possible, can you add some python level unit test? |
@@ -112,6 +112,25 @@ int64_t SizeEq::getDynamicValue() const { | |||
|
|||
std::string SizeEq::ToString() const { return "SizeEq"; } | |||
|
|||
SizeNe::SizeNe(torch::lazy::Value a, torch::lazy::Value b) | |||
: XlaNode(torch::lazy::OpKind{c10::Symbol::fromQualString("aten::ne")}, | |||
{a, b}, xla::ShapeUtil::MakeShape(xla::S64, {}), 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.
let' use GetShapeDimensionType
, @vanbasten23 when can we update all those s64 in the sizeNode to GetShapeDimensionType
?
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.
Ack. I'm blocked on #4258 to update all return type: I could've done the casting to unblock me but I'd really like to understand where the s32/s64 mismatch comes from before blindly do the casting. I left a comment. Can you take another look @JackCaoG ?
On another thought, I'm not technically blocked by the above PR to update all those s64 in the sizeNode to use GetShapeDimensionType
, let me do that today. Thanks for the reminder.
No description provided.