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
[Grappler] Add dataset.shard(1, 0) to noop_elimination pass #47499
Conversation
@@ -43,6 +43,23 @@ NodeDef *MakeUnaryNode(StringPiece node_type, int count, string input_node, | |||
GetCommonAttributes(), graph); | |||
} | |||
|
|||
NodeDef *MakeShardNode(int count, string input_node, MutableGraphView *graph) { |
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.
Instead of introducing MakeShardNode
, generalize MakeUnaryNode
to take a list of integers (as opposed to a single integer).
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.
Updated.
@@ -51,6 +68,23 @@ NodeDef *MakeUnaryNonConstNode(StringPiece node_type, string input_node, | |||
GetCommonAttributes(), graph); | |||
} | |||
|
|||
NodeDef *MakeShardNonConstNode(string input_node, MutableGraphView *graph) { |
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.
Instead of introducing MakeShardNonConstNode
, generalize MakeNonConstNode
to take a list of DTYPES to use to create placeholders.
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.
Updated.
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.
Thanks. Left a couple of minor comments.
Thank you for your time on reviewing this PR. There are some addition to the test as
ShardDataset
is not a unary dataset op.