PhilippvK commented on code in PR #14272:
URL: https://github.com/apache/tvm/pull/14272#discussion_r1136934156


##########
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:
   It is in fact redundant, especially since I use `nargs='+'`.
   
   I will drop it when fixing the CI bugs



-- 
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]

Reply via email to