-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Look for TupleType instead of TupleNode in LayoutRewriter #5018
Conversation
Trevor, can you please add a test case? The implementation is good, but we need a test case. |
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.
IMHO, I don't think we need to test this functionality in the partitioning pass as it is a unit test of layout itself. Instead, You can directly make the "partitioned" graph and run Alterlayout pass and assert whatever IR it should emit.
Hi Zhi, I don't think it is possible to create the partitioned graph without actually using partitoning. I recreated the subgraph below:
However, the
Edit: I was able to bypass this by calling |
Above PR have same line changes. Might be a good idea to try that first. |
@trevor-m @anijain2305 @zhiics please followup |
Closing since #5066 also solves this issue. |
When getting the input shapes from the args LayoutRewriter checked for tuples only by seeing if the node is an instance of TupleNode. With that code, the following relay program would encounter an error during LayoutRewriter because the arg to the function is a relay.Var but has a TupleTypeNode instead of a TensorTypeNode as it expected.
@zhiics @anijain2305 Could you please review?