Mousius commented on a change in pull request #10463:
URL: https://github.com/apache/tvm/pull/10463#discussion_r838513266



##########
File path: tests/python/contrib/test_ethosn/test_mean.py
##########
@@ -40,18 +41,22 @@ def _get_model(shape, axis, keepdims, input_zp, input_sc, 
output_zp, output_sc,
 
 
 @requires_ethosn
-def test_mean():
-    trials = [(1, 7, 7, 2048), (1, 8, 8)]
+@pytest.mark.parametrize("dtype", ["uint8", "int8"])
+@pytest.mark.parametrize("shape", [(1, 7, 7, 2048), (1, 8, 8)])
+def test_mean(dtype, shape):
+    zp_min = np.iinfo(dtype).min
+    zp_max = np.iinfo(dtype).max
 
     np.random.seed(0)
-    for shape in trials:
-        inputs = {
-            "a": tvm.nd.array(np.random.randint(0, high=255, size=shape, 
dtype="uint8")),
-        }
-        outputs = []
-        for npu in [False, True]:
-            model = _get_model(shape, [1, 2], True, 128, 0.0784314, 128, 
0.0784314, "uint8")
-            mod = tei.make_module(model, [])
-            outputs.append(tei.build_and_run(mod, inputs, 1, {}, npu=npu))
-
-        tei.verify(outputs, "uint8", 1)
+    inputs = {
+        "a": tvm.nd.array(np.random.randint(zp_min, high=zp_max + 1, 
size=shape, dtype=dtype)),
+    }
+    outputs = []
+    for npu in [False, True]:

Review comment:
       Ohhh, sorry, I misread the end bit of the test. My bad!




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