tvm-commits mailing list archives

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

comaniac 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:
       It's fine to me tho. What I care is whether we can have the following function signature,
for example:
   def convert_qnn_conv2d(desired_layouts: Tuple[str, str])
   def convert_qnn_pool(desired_layouts: Tuple[str])
   But this is a miner point so feel free to merge this PR without it.

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