echuraev commented on code in PR #13408:
URL: https://github.com/apache/tvm/pull/13408#discussion_r1024842090


##########
tests/python/relay/opencl_texture/test_network.py:
##########
@@ -0,0 +1,61 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import re
+import tvm
+import numpy as np
+from tvm import relay
+from tvm.relay import testing
+from tvm.contrib import utils
+from utils.adreno_utils import gpu_preprocess, build_run_compare, get_model
+import pytest
+
+from tvm.relay.op import register_mixed_precision_conversion
+
+dtype = tvm.testing.parameter("float32", "float16")
+
+
+def convert_to_fp16(mod, dtype):
+    from tvm.ir import IRModule
+
+    mod = IRModule.from_expr(mod)
+    seq = tvm.transform.Sequential(
+        [relay.transform.InferType(), relay.transform.ToMixedPrecision()]
+    )
+    with tvm.transform.PassContext(opt_level=3):
+        mod = seq(mod)
+        return mod
+
+
[email protected]_opencl
[email protected]_targets("opencl -device=adreno")
+def test_mobilenet_v1(remote, target, dtype):
+    if dtype == "float16" and remote is None:
+        # CI doesn't support fp16(half datatypes).
+        return

Review Comment:
   Probably, we could create two test cases, one for `fp16` and the second for 
`fp32`. Move the body of the `test_mobilenet_v1` to the common function and 
call it from these two test cases.
   And use `@pytest.mark.skipif(tvm.testing.utils.IS_IN_CI, reason="CI doesn't 
support fp16(half datatypes)")` for the test case with fp16.



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