diff --git a/tests/benchdnn/benchdnn.cpp b/tests/benchdnn/benchdnn.cpp index c2ac543aaf5..fe387557f02 100644 --- a/tests/benchdnn/benchdnn.cpp +++ b/tests/benchdnn/benchdnn.cpp @@ -150,7 +150,7 @@ int main(int argc, char **argv) { printf("total compute_ref: sum(s):%.2f\n", compute_ref_time_s); } - reset_gpu_profiling(); + finalize(); return !!benchdnn_stat.failed; } diff --git a/tests/benchdnn/dnnl_common.cpp b/tests/benchdnn/dnnl_common.cpp index d0cef587fe8..c117a808c50 100644 --- a/tests/benchdnn/dnnl_common.cpp +++ b/tests/benchdnn/dnnl_common.cpp @@ -356,6 +356,10 @@ void get_gpu_profiling_info(uint64_t &nsec, double &freq, int mode) { #endif } +void finalize() { + reset_gpu_profiling(); +} + inline bool should_stop(const timer::timer_t &t) { const bool stop = false || (fix_times_per_prb && t.times() >= fix_times_per_prb) diff --git a/tests/benchdnn/dnnl_common.hpp b/tests/benchdnn/dnnl_common.hpp index a72e210acaa..fd08e0c31b2 100644 --- a/tests/benchdnn/dnnl_common.hpp +++ b/tests/benchdnn/dnnl_common.hpp @@ -670,6 +670,8 @@ int execute_and_wait( dnnl_primitive_t prim, const args_t &args, res_t *res = nullptr); void reset_gpu_profiling(); +void finalize(); + int measure_perf(const thr_ctx_t &ctx, res_t *res, perf_function_t &perf_func, args_t &args); int measure_perf(