tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <>
Subject [GitHub] [incubator-tvm] anijain2305 commented on a change in pull request #5422: [RELAY][Convert Layout] Specify additional layouts in convert layout pass
Date Wed, 06 May 2020 00:11:10 GMT

anijain2305 commented on a change in pull request #5422:

File path: docs/dev/convert_layout.rst
@@ -218,24 +224,49 @@ Second example is for a lightly-layout sensitive operator - batch normalization.
 ConvertLayout pass is extremely easy to use. The pass is not a part of default
pipeline. The intended usage is to call it between the framework-to-relay parser and
module call.
+In order to specify the layouts to convert to, we create a mapping of heavily-layout sensitive
operators to a list of the desired layouts for that operator.
 .. code-block:: python
     # TFlite framework to Relay parser - Default layout is NHWC
     mod, params = relay.frontend.from_tflite(tflite_model,
+    # We assume our model's heavily-layout sensitive operators only consist of nn.conv2d
+    desired_layouts = {'nn.conv2d': ['NCHW']}

Review comment:
       I see. That makes sense.
   For this PR, I think we can start with a dict from python that is Map<String, Array<String>>
for now. We can then send a separate PR for stricter type 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.

For queries about this service, please contact Infrastructure at:

View raw message