diff --git a/include/ck/host_utility/kernel_launch.hpp b/include/ck/host_utility/kernel_launch.hpp index 11a1c9bbc0..2e411d9f56 100644 --- a/include/ck/host_utility/kernel_launch.hpp +++ b/include/ck/host_utility/kernel_launch.hpp @@ -38,7 +38,9 @@ float launch_and_time_kernel(const StreamConfig& stream_config, for(int i = 0; i < stream_config.cold_niters_; ++i) { kernel<<>>(args...); + std::cout << "From CK 1:" << std::endl; hip_check_error(hipGetLastError()); + std::cout << "From CK 2:" << std::endl; } const int nrepeat = stream_config.nrepeat_; @@ -48,39 +50,53 @@ float launch_and_time_kernel(const StreamConfig& stream_config, } hipEvent_t start, stop; + std::cout << "From CK 3:" << std::endl; hip_check_error(hipEventCreate(&start)); + std::cout << "From CK 4:" << std::endl; hip_check_error(hipEventCreate(&stop)); + std::cout << "From CK 5:" << std::endl; hip_check_error(hipDeviceSynchronize()); + std::cout << "From CK 6:" << std::endl; hip_check_error(hipEventRecord(start, stream_config.stream_id_)); + std::cout << "From CK 7:" << std::endl; for(int i = 0; i < nrepeat; ++i) { kernel<<>>(args...); + std::cout << "From CK 8:" << std::endl; hip_check_error(hipGetLastError()); + std::cout << "From CK 9:" << std::endl; } + std::cout << "From CK 10:" << std::endl; hip_check_error(hipEventRecord(stop, stream_config.stream_id_)); + std::cout << "From CK 11:" << std::endl; hip_check_error(hipEventSynchronize(stop)); - + std::cout << "From CK 12:" << std::endl; float total_time = 0; hip_check_error(hipEventElapsedTime(&total_time, start, stop)); + std::cout << "From CK 13:" << std::endl; hip_check_error(hipEventDestroy(start)); + std::cout << "From CK 14:" << std::endl; hip_check_error(hipEventDestroy(stop)); + std::cout << "From CK 15:" << std::endl; return total_time / nrepeat; } else { kernel<<>>(args...); + std::cout << "From CK 16:" << std::endl; hip_check_error(hipGetLastError()); return 0; } #else kernel<<>>(args...); + std::cout << "From CK 17:" << std::endl; hip_check_error(hipGetLastError()); return 0; @@ -96,6 +112,7 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config, std::size_t lds_byte, Args... args) { + std::cout << "From CK 20:" << std::endl; #if CK_TIME_KERNEL if(stream_config.time_kernel_) { @@ -166,5 +183,6 @@ float launch_and_time_kernel_with_preprocess(const StreamConfig& stream_config, return 0; #endif +std::cout << "From CK 21:" << std::endl; } #endif