Skip to content

Commit

Permalink
lower flops ratio, machine may be using multiple threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan Konolige committed May 11, 2022
1 parent 4be1d83 commit 74e3dad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/python/unittest/test_runtime_profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ def test_estimate_peak_fma_flops(target, dev):
flops = tvm.utils.estimate_peak_fma_flops(tvm.target.Target(target), dev)
# Assume we can achieve 1 GFLOP/s per thread, which is 1 FLOP per cycle on a 1GHz cpu.
assert (
flops > 10**9 * tvm.runtime.num_threads() and flops < 10**14
), f"FLOP/s should be between 10^9 * num_threads and 10^14, but it is {flops}"
flops > 10**9 and flops < 10**14
), f"FLOP/s should be between 10^9 and 10^14, but it is {flops}"


def test_estimate_peak_fma_flops_rpc():
Expand All @@ -279,8 +279,8 @@ def test_estimate_peak_fma_flops_rpc():
flops = tvm.utils.estimate_peak_fma_flops(tvm.target.Target(target), dev, remote=remote)
# Assume we can achieve 1 GFLOP/s per thread, which is 1 FLOP per cycle on a 1GHz cpu.
assert (
flops > 10**9 * tvm.runtime.num_threads() and flops < 10**14
), f"FLOP/s should be between 10^9 * num_threads and 10^14, but it is {flops}"
flops > 10**9 and flops < 10**14
), f"FLOP/s should be between 10^9 and 10^14, but it is {flops}"


@tvm.testing.parametrize_targets("llvm")
Expand Down

0 comments on commit 74e3dad

Please sign in to comment.