Skip to content

Commit c4c0a49

Browse files
authored
[Tests] Fix str vs. int comparison in test_num_threads (#16017)
1 parent 5ac2d1a commit c4c0a49

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/python/unittest/test_runtime_module_based_interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -680,9 +680,9 @@ def test_num_threads():
680680
env_threads = os.getenv("TVM_NUM_THREADS")
681681
omp_env_threads = os.getenv("OMP_NUM_THREADS")
682682
if env_threads is not None:
683-
assert reported == env_threads
683+
assert reported == int(env_threads)
684684
elif omp_env_threads is not None:
685-
assert reported == omp_env_threads
685+
assert reported == int(omp_env_threads)
686686
else:
687687
hardware_threads = os.cpu_count()
688688
assert reported == hardware_threads or reported == hardware_threads // 2

0 commit comments

Comments
 (0)