Skip to content

Commit 28ad8ae

Browse files
authored
Fix timing issue in CK_TILE GEMM example (#2940)
1 parent bebf0e9 commit 28ad8ae

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

example/ck_tile/03_gemm/gemm_splitk_two_stage_invoker.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ struct SplitKTwoStageInvoker
231231
preprocess = clear_gemm_output;
232232
}
233233

234-
return ck_tile::launch_kernel_time_mask(
234+
ave_time = ck_tile::launch_kernel_time_mask(
235235
s,
236236
preprocess,
237237
ck_tile::make_kernel<GemmConfig::kBlockPerCu>(
@@ -245,6 +245,8 @@ struct SplitKTwoStageInvoker
245245
ck_tile::make_tuple(args.N, 1), // Output Stride
246246
input_tensors,
247247
static_cast<CDataType*>(c_ptr)));
248+
249+
return ave_time;
248250
};
249251

250252
const auto RunSplitk = [&](const auto has_hot_loop_, const auto tail_number_) {

example/ck_tile/03_gemm/universal_gemm_invoker.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ struct UniversalInvoker
174174
preprocess = clear_gemm_output;
175175
}
176176

177-
return ck_tile::launch_kernel_time_mask(
177+
ave_time = ck_tile::launch_kernel_time_mask(
178178
s,
179179
preprocess,
180180
ck_tile::make_kernel<GemmConfig::kBlockPerCu>(Kernel{}, grids, blocks, 0, kargs));
181+
182+
return ave_time;
181183
};
182184

183185
const auto RunSplitk = [&](const auto has_hot_loop_, const auto tail_number_) {

0 commit comments

Comments
 (0)