Skip to content

Commit 3c3e893

Browse files
author
Yuuichi Asahi
committed
we do not need output file for print_ascii
1 parent e7ebfa4 commit 3c3e893

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

profiling/simple-kernel-timer/kp_kernel_timer.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ namespace KokkosTools {
2727
namespace KernelTimer {
2828
enum KokkosToolsTimerOutputFormat { ascii, binary, json };
2929

30-
void print_ascii(FILE* output,
31-
std::map<std::string, KernelPerformanceInfo*>& count_map,
30+
void print_ascii(std::map<std::string, KernelPerformanceInfo*>& count_map,
3231
double totalExecuteTime) {
3332
std::vector<KernelPerformanceInfo*> kernelInfo;
3433
double totalKernelsTime = 0;
@@ -225,6 +224,9 @@ void kokkosp_finalize_library() {
225224
} else if (kokkos_tools_timer_binary) {
226225
output_format = binary;
227226
output_format_str = "dat";
227+
} else {
228+
print_ascii(count_map, totalExecuteTime);
229+
return;
228230
}
229231

230232
double kernelTimes = 0;
@@ -241,7 +243,6 @@ void kokkosp_finalize_library() {
241243
const double totalExecuteTime = (finishTime - initTime);
242244
switch (output_format) {
243245
case ascii: {
244-
print_ascii(output_data, count_map, totalExecuteTime);
245246
break;
246247
}
247248
case binary: {

0 commit comments

Comments
 (0)