Skip to content

Commit

Permalink
[Tests] Fix str vs. int comparison in test_num_threads (#16017)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Oct 31, 2023
1 parent 5ac2d1a commit c4c0a49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python/unittest/test_runtime_module_based_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c4c0a49

Please sign in to comment.