You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by zi...@apache.org on 2020/09/08 00:03:13 UTC
[incubator-tvm] branch master updated: [TESTING] Fix the error when
running tests with default targets (#6394)
This is an automated email from the ASF dual-hosted git repository.
ziheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/master by this push:
new d08eb9a [TESTING] Fix the error when running tests with default targets (#6394)
d08eb9a is described below
commit d08eb9a813d8fe46767ed031cf1c109d855d378a
Author: Tianqi Chen <tq...@users.noreply.github.com>
AuthorDate: Mon Sep 7 17:02:55 2020 -0700
[TESTING] Fix the error when running tests with default targets (#6394)
---
python/tvm/testing.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/python/tvm/testing.py b/python/tvm/testing.py
index 0a568b0..270f37f 100644
--- a/python/tvm/testing.py
+++ b/python/tvm/testing.py
@@ -329,11 +329,13 @@ def _get_targets():
target_str = os.environ.get("TVM_TEST_TARGETS", "")
if len(target_str) == 0:
target_str = DEFAULT_TEST_TARGETS
- targets = {
- dev
- for dev in target_str.split(";")
- if len(dev) > 0 and tvm.context(dev, 0).exist and tvm.runtime.enabled(dev)
- }
+ targets = set()
+ for dev in target_str.split(";"):
+ if len(dev) == 0:
+ continue
+ target_kind = dev.split()[0]
+ if tvm.runtime.enabled(target_kind) and tvm.context(target_kind, 0).exist:
+ targets.add(dev)
if len(targets) == 0:
logging.warning(
"None of the following targets are supported by this build of TVM: %s."