leandron commented on code in PR #13632:
URL: https://github.com/apache/tvm/pull/13632#discussion_r1050542801


##########
python/tvm/relay/op/nn/_nn.py:
##########
@@ -47,6 +47,42 @@
 # log_softmax
 reg.register_strategy("nn.log_softmax", strategy.log_softmax_strategy)
 
+# upsampling_tanspose

Review Comment:
   ```suggestion
   # upsampling_transpose
   ```



##########
python/tvm/relay/op/nn/_nn.py:
##########
@@ -47,6 +47,42 @@
 # log_softmax
 reg.register_strategy("nn.log_softmax", strategy.log_softmax_strategy)
 
+# upsampling_tanspose
[email protected]_convert_op_layout("nn.upsampling")
+def convert_upsampling(attrs, inputs, tinfos, desired_layouts):
+    """Convert Layout pass registration for upsampling op.
+
+    Parameters
+    ----------
+    attrs : tvm.ir.Attrs
+        Attributes of current convolution
+    inputs : list of tvm.relay.Expr
+        The args of the Relay expr to be legalized
+    tinfos : list of types
+        List of input and output types
+    desired_layouts : list of layout strings
+        List of layouts defining our desired
+        layout for the data and kernel inputs respectively.
+
+    Returns
+    -------
+    result : tvm.relay.Expr
+        The transformed expr
+    """
+    data = inputs[0]
+    new_attrs = dict(attrs)
+    assert len(desired_layouts) == 1, "A desired layout is expected for 
upsampling's inputs"

Review Comment:
   ```suggestion
       assert len(desired_layouts) == 1, "A desired layout is expected for 
upsampling inputs"
   ```



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