[CK][EXAMPLES] (#2826)

-Added parameter to enable/disable verification and timing of kernel in various examples that missed it.
-Added parameter to change number of groups to execute in grouped_gemm_examples.

Signed-off-by: Michal Kulikowski <Michal.Kulikowski@amd.com>

[ROCm/composable_kernel commit: ffe9775e70]
This commit is contained in:
Michał Kulikowski
2025-09-11 21:33:00 +02:00
committed by GitHub
parent 358f7ab285
commit a6bcf8ec3b
33 changed files with 578 additions and 116 deletions

View File

@@ -77,9 +77,26 @@ void host_elementwise2D(HostTensorC& C,
}
}
int main()
int main(int argc, char* argv[])
{
bool time_kernel = true;
bool do_verification = true;
bool time_kernel = true;
if(argc == 1)
{
// use default
}
else if(argc == 3)
{
do_verification = std::stoi(argv[1]);
time_kernel = std::stoi(argv[2]);
}
else
{
printf("arg1: verification (0=no, 1=yes)\n");
printf("arg2: time kernel (0=no, 1=yes)\n");
exit(0);
}
ck::index_t M = 48 * 256;
ck::index_t N = 1024;
@@ -157,6 +174,7 @@ int main()
std::cout << "Time elapase is : " << ela_time << " ms . " << std::endl;
bool pass = true;
if(do_verification)
{
std::vector<std::size_t> mn = {static_cast<unsigned long>(M),
static_cast<unsigned long>(N)};