You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by lu...@apache.org on 2023/10/31 10:21:36 UTC

(tvm) branch main updated: [Tests] Check int8+int32 testcases in test_estimate_peak_flops_cpu (#16019)

This is an automated email from the ASF dual-hosted git repository.

lukhut pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 5b561a6059 [Tests] Check int8+int32 testcases in test_estimate_peak_flops_cpu (#16019)
5b561a6059 is described below

commit 5b561a60593012ad1e30d868fbba9362bbfdc289
Author: Philipp van Kempen <ph...@tum.de>
AuthorDate: Tue Oct 31 11:21:30 2023 +0100

    [Tests] Check int8+int32 testcases in test_estimate_peak_flops_cpu (#16019)
    
    Pytest param fixture for dtypes was not used resulting in these two test cases not beeing checked.
---
 tests/python/unittest/test_roofline.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/python/unittest/test_roofline.py b/tests/python/unittest/test_roofline.py
index 7a1c3478c5..cb8336630e 100644
--- a/tests/python/unittest/test_roofline.py
+++ b/tests/python/unittest/test_roofline.py
@@ -42,7 +42,7 @@ def test_estimate_peak_flops_cpu(dtype):
     target = tvm.target.Target("llvm -mattr=+fma,+avx2")
     dev = remote.device(str(target))
     # This test uses vectorized instructions so we need a target that supports them
-    flops = tvm.utils.roofline.x86.estimate_peak_fma_vector_flops(target, dev, remote, "float32")
+    flops = tvm.utils.roofline.x86.estimate_peak_fma_vector_flops(target, dev, remote, dtype)
     # Assume we can achieve 1 GFLOP/s per thread, which is 1 FLOP per cycle on a 1GHz cpu.
     assert (
         flops > 10**9 and flops < 10**14