quic-sanirudh commented on a change in pull request #9017:
URL: https://github.com/apache/tvm/pull/9017#discussion_r710050405



##########
File path: tests/python/frontend/onnx/test_forward.py
##########
@@ -3056,6 +3056,152 @@ def verify_global_pooling(x_shape, mode):
         verify_global_pooling([4, 1, 2, 6, 4], mode)
 
 
[email protected]_targets
+def test_qlinear_average_pool(target, dev):
+    def verify_qlinear_average_pool(
+        x_shape, kernel_shape, strides, pads, out_shape, auto_pad="NOTSET"
+    ):
+        input_nodes = [
+            helper.make_tensor_value_info("X", TensorProto.FLOAT, 
list(x_shape)),
+        ]
+
+        output_nodes = [
+            helper.make_tensor_value_info("Y", TensorProto.FLOAT, 
list(out_shape)),
+        ]
+
+        input_names = ["X"]
+
+        node = helper.make_node(
+            "AveragePool",

Review comment:
       Actually it should be the non-quantized names, since we're only creating 
the floating point ops. When we quantize the graph, it gets converted to 
QLinearAveragePool. I printed the node that gets generated after quantization 
to verify, and I got the below output:
   
   ```
   [node {
     input: "X_quantized"
     input: "X_scale"
     input: "X_zero_point"
     input: "Y_scale"
     input: "Y_zero_point"
     output: "Y_quantized"
     op_type: "QLinearAveragePool"
     attribute {
       name: "auto_pad"
       s: "SAME_UPPER"
       type: STRING
     }
     attribute {
       name: "kernel_shape"
       ints: 3
       ints: 3
       ints: 3
       type: INTS
     }
     attribute {
       name: "strides"
       ints: 2
       ints: 2
       ints: 2
       type: INTS
     }
     domain: "com.microsoft"
   }](url)
   ```




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