From 616ad45ceff37015ae7f394ecedc6a3573ba1f14 Mon Sep 17 00:00:00 2001 From: kiefer Date: Fri, 5 Dec 2025 13:37:07 +0000 Subject: [PATCH] Print number of valid instances in profiler and tests. --- .../profiler/profile_grouped_conv_bwd_weight_impl.hpp | 2 ++ .../test_grouped_convnd_bwd_weight_bilinear.cpp | 1 + .../test_grouped_convnd_bwd_weight_scale.cpp | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/profiler/include/profiler/profile_grouped_conv_bwd_weight_impl.hpp b/profiler/include/profiler/profile_grouped_conv_bwd_weight_impl.hpp index 865aa440b3..d5dbf1f3e3 100644 --- a/profiler/include/profiler/profile_grouped_conv_bwd_weight_impl.hpp +++ b/profiler/include/profiler/profile_grouped_conv_bwd_weight_impl.hpp @@ -349,6 +349,8 @@ bool profile_grouped_conv_bwd_weight_impl(int do_verification, } } + printf("\033[36mvalids: %d\033[0m\n", num_kernel); + std::cout << "Best configuration parameters:" << "\nname: " << best_op_name << "\navg_time: " << best_avg_time << "\ntflops: " << best_tflops << "\nGB/s: " << best_gb_per_sec << ", SplitK " << best_split_k << std::endl; diff --git a/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_bilinear.cpp b/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_bilinear.cpp index e7a3f8731b..c4c602362d 100644 --- a/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_bilinear.cpp +++ b/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_bilinear.cpp @@ -260,6 +260,7 @@ class TestGroupedConvndBwdWeight : public ::testing::Test std::cout << "grouped_conv_bwd_weight_instance (" << instance_index << "/" << num_kernel << "): Passed" << std::endl; } + printf("\033[36mvalids: %d\033[0m\n", num_kernel); return passed; } diff --git a/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_scale.cpp b/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_scale.cpp index 44cda94e3e..a2e29c4185 100644 --- a/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_scale.cpp +++ b/test/grouped_convnd_bwd_weight/test_grouped_convnd_bwd_weight_scale.cpp @@ -156,6 +156,8 @@ class TestGroupedConvndBwdWeight : public ::testing::Test const auto op_ptrs = ck::tensor_operation::device::instance::DeviceOperationInstanceFactory< DeviceOp>::GetInstances(); + int num_kernel = 0; + for(std::size_t i = 0; i < op_ptrs.size(); ++i) { auto& op_ptr = op_ptrs[i]; @@ -189,6 +191,7 @@ class TestGroupedConvndBwdWeight : public ::testing::Test if(op_ptr->IsSupportedArgument(argument_ptr.get())) { + num_kernel++; float avg_time = invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr}); wei_device_buf.FromDevice(wei_device.mData.data()); @@ -237,6 +240,8 @@ class TestGroupedConvndBwdWeight : public ::testing::Test std::cerr << op_name << " does not support this problem" << std::endl; } } + + printf("\033[36mvalids: %d\033[0m\n", num_kernel); return passed; }