-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix for monodle failure #629
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -697,7 +697,14 @@ def populate_conv2d_transpose_args(graph, nid, compiler_cfg): | |
) | ||
) | ||
|
||
in_channel = next((n["attrs"]["shape"][0][0][0] for n in graph["nodes"] if n["name"] == "model.weight"), None) | ||
in_channel = None | ||
for input_ in node["inputs"]: | ||
input_nid = input_[0] | ||
input_node = graph["nodes"][input_nid] | ||
if input_node["op"] == "parameter" and input_node["name"].endswith("weight"): | ||
in_channel = input_node["attrs"]["shape"][0][0][0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this handle different shape ranks? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, inputs are either going to be 3d or 4d for convtranspose2d which is handled here, I have added different shape rank shape inputs in sanity now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How does it work for channel first and channel last cases? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. input_node["attrs"]["shape"][0][0][0] corresponds to the in-channels from the param being sent
|
||
break | ||
|
||
groups = int(node["attrs"]["groups"][0][0]) | ||
assert groups == 1 or (in_channel is not None and groups == in_channel), "Only supports group of 1 or in_channel" | ||
args.append( | ||
|
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.
As this is a TTNN limitation, do we need to assert this here?
Let's track this as their issues, and model it further if we see that this is by design :))
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.
@nvukobratTT , the TTNN limitation is for a different model i.e mobilenetv2 and not for this model, these changes has been added to modify the padding handled in eval function of convtranspose2d op as a fix for monodle model.
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.
Is this an implementation limitation from our size regarding conv2d transpose? More precisely, my question is can we support this on FFE with different padding for each side?
If yes, let's update assert message to be a bit more cleaner about why this is limitation :))
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.
Sure Nikola, I will check that and make required changes.