You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ma...@apache.org on 2023/10/31 07:05:12 UTC

(tvm) branch main updated: [Tests] Fix str vs. int comparison in test_num_threads (#16017)

This is an automated email from the ASF dual-hosted git repository.

masahi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new c4c0a492af [Tests] Fix str vs. int comparison in test_num_threads (#16017)
c4c0a492af is described below

commit c4c0a492afabe303eb00ae92b3a7b9f8265980fe
Author: Philipp van Kempen <ph...@tum.de>
AuthorDate: Tue Oct 31 08:05:06 2023 +0100

    [Tests] Fix str vs. int comparison in test_num_threads (#16017)
---
 tests/python/unittest/test_runtime_module_based_interface.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/python/unittest/test_runtime_module_based_interface.py b/tests/python/unittest/test_runtime_module_based_interface.py
index 0ed097ddf5..6e62e3f215 100644
--- a/tests/python/unittest/test_runtime_module_based_interface.py
+++ b/tests/python/unittest/test_runtime_module_based_interface.py
@@ -680,9 +680,9 @@ def test_num_threads():
     env_threads = os.getenv("TVM_NUM_THREADS")
     omp_env_threads = os.getenv("OMP_NUM_THREADS")
     if env_threads is not None:
-        assert reported == env_threads
+        assert reported == int(env_threads)
     elif omp_env_threads is not None:
-        assert reported == omp_env_threads
+        assert reported == int(omp_env_threads)
     else:
         hardware_threads = os.cpu_count()
         assert reported == hardware_threads or reported == hardware_threads // 2