anko-intel commented on a change in pull request #20816:
URL: https://github.com/apache/incubator-mxnet/pull/20816#discussion_r794421186



##########
File path: tests/python/dnnl/subgraphs/test_conv_subgraph.py
##########
@@ -115,6 +115,45 @@ def forward(self, x):
   check_fusion(net, data_shape, attr)
 
 
[email protected]_np
[email protected]('data_shape', DATA_SHAPE)
[email protected]('no_bias', [True, False])
[email protected]('out_type', ['int8', 'auto'])
+def test_pos_conv_add3(no_bias, data_shape, out_type):
+  # conv + add fusion case 3
+  class ConvAdd(nn.HybridBlock):
+    def __init__(self, use_bias, **kwargs):
+        super(ConvAdd, self).__init__(**kwargs)
+        self.conv0 = nn.Conv2D(channels=data_shape[1], kernel_size=(1, 1), 
strides=1, use_bias=use_bias)
+
+    def forward(self, x):
+      out = x + self.conv0(x)
+      return out
+
+  net = ConvAdd(use_bias=True)
+  check_quantize(net, data_shape, out_type)
+
+
[email protected]_np
[email protected]('data_shape', DATA_SHAPE)
[email protected]('no_bias', [True, False])
[email protected]('out_type', ['int8', 'auto'])
+def test_pos_conv_add4(no_bias, data_shape, out_type):
+  # conv + add fusion case 4
+  class ConvAdd(nn.HybridBlock):
+    def __init__(self, use_bias, **kwargs):
+        super(ConvAdd, self).__init__(**kwargs)
+        self.conv0 = nn.Conv2D(channels=data_shape[1], kernel_size=(1, 1), 
strides=1, use_bias=use_bias)
+        self.conv1 = nn.Conv2D(channels=64, kernel_size=(3, 3), strides=1, 
use_bias=use_bias)
+
+    def forward(self, x):
+      out = self.conv1(x + self.conv0(x))
+      return out
+
+  net = ConvAdd(use_bias=True)
+  check_quantize(net, data_shape, out_type)
+
+

Review comment:
       What about test with convolution, activation and sum ?




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