mbrookhart commented on a change in pull request #9017:
URL: https://github.com/apache/tvm/pull/9017#discussion_r710553130



##########
File path: python/tvm/relay/frontend/onnx.py
##########
@@ -654,6 +676,40 @@ def _impl_v1(cls, inputs, attr, params):
         )
 
 
+class QLinearGlobalAveragePool(OnnxOpConverter):
+    "Operator converter for QLinearGlobalAveragePool from Microsoft 
onnxruntime contrib opset."
+
+    @classmethod
+    def _impl_v1(cls, inputs, attr, params):
+        rank = len(infer_shape(inputs[0]))
+
+        x_scale = get_scalar(inputs[1], params)
+        x_zero_point = get_scalar(inputs[2], params, dtype="int32")
+        y_scale = fold_constant(get_scalar(inputs[3], params))
+        y_zero_point = get_scalar(inputs[4], params, dtype="int32")
+
+        input_dtype = infer_type(inputs[0]).checked_type.dtype
+
+        # Onnxruntime documentation does not mention that this global avg_pool 
should follow the

Review comment:
       I have AvgPool in FakeQuantizationToInteger already, we can use that to 
convert to integer if needed. I haven't done GlobalAvgPool yet.




-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to