Print number of valid instances in profiler and tests.

This commit is contained in:
kiefer
2025-12-05 13:37:07 +00:00
parent d201572ae4
commit 616ad45cef
3 changed files with 8 additions and 0 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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;
}