From 74e3dadd91be982f3178f803118814fc94088555 Mon Sep 17 00:00:00 2001 From: Tristan Konolige Date: Wed, 11 May 2022 09:43:51 -0700 Subject: [PATCH] lower flops ratio, machine may be using multiple threads --- tests/python/unittest/test_runtime_profiling.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/python/unittest/test_runtime_profiling.py b/tests/python/unittest/test_runtime_profiling.py index 281cad3e5fbe..0325c7f3b5fe 100644 --- a/tests/python/unittest/test_runtime_profiling.py +++ b/tests/python/unittest/test_runtime_profiling.py @@ -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(): @@ -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")