Skip to content

Commit

Permalink
resolve issue #10107 by setting eps larger (#10176)
Browse files Browse the repository at this point in the history
* resolve issue #10107 by setting eps larger

* use numpy.testing.assert_allclose
  • Loading branch information
wrongtest-intellif authored Feb 10, 2022
1 parent 9f7f4c6 commit 345eb09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/python/unittest/test_tir_schedule_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from collections import defaultdict
import sys

import numpy
import pytest

from tvm import tir
Expand Down Expand Up @@ -190,7 +191,7 @@ def test_sample_compute_location():
n_candidates = 8
expected_rate = 1.0 / n_candidates
for _, cnt in decision_dict.items():
assert (expected_rate - 0.03) * n <= cnt <= (expected_rate + 0.03) * n
numpy.testing.assert_allclose(expected_rate, cnt / n, atol=0.04)


if __name__ == "__main__":
Expand Down

0 comments on commit 345eb09

Please sign in to comment.