You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/09/16 14:50:35 UTC

[GitHub] [tvm] mehrdadh commented on a change in pull request #9018: [microTVM][autoTVM] Follow up fixes to #9003

mehrdadh commented on a change in pull request #9018:
URL: https://github.com/apache/tvm/pull/9018#discussion_r710195264



##########
File path: python/tvm/micro/testing.py
##########
@@ -0,0 +1,36 @@
+# 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.
+
+"""Defines testing methods used with microTVM."""
+
+import pathlib
+import json
+from typing import Union
+
+
+def _check_tune_log(log_path: Union[pathlib.Path, str]):
+    """Reads tune log and check each result"""
+    results = []
+    with open(log_path, "r") as f:
+        line = f.readline()
+        while line:
+            results.append(json.loads(line))
+            line = f.readline()
+
+    for item in results:
+        tune_result = item["result"]
+        assert tune_result[0][0] < 1000000000.0

Review comment:
       Thanks for the review.
   If this is the only change, I will fix it in the follow on PR: https://github.com/apache/tvm/pull/9026




-- 
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-unsubscribe@tvm.apache.org

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