lhutton1 commented on code in PR #14272:
URL: https://github.com/apache/tvm/pull/14272#discussion_r1136905419
##########
python/tvm/driver/tvmc/transform.py:
##########
@@ -123,7 +125,29 @@ def convert_graph_layout(mod, desired_layout, ops=None):
if ops is None:
ops = ["nn.conv2d", "nn.conv2d_transpose", "qnn.conv2d"]
- desired_layouts = {op: [desired_layout, "default"] for op in ops}
+ if not isinstance(desired_layouts, list):
+ # For backwards compatibility
+ assert isinstance(desired_layouts, str)
+ desired_layouts = [desired_layouts]
+
+ assert len(desired_layouts) > 0
Review Comment:
Nit: This check seems redundant to me, I think if no layouts are provided
the convert layout pass won't do anything - would it be okay to check?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]