From d821c9700361a4de17d68e9a1bed55853d8d53b9 Mon Sep 17 00:00:00 2001 From: Mathieu Faverge <mathieu.faverge@inria.fr> Date: Fri, 27 Jan 2023 22:41:14 +0100 Subject: [PATCH] starpu: fix an old small issue with profiling --- runtime/starpu/include/runtime_codelet_profile.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/starpu/include/runtime_codelet_profile.h b/runtime/starpu/include/runtime_codelet_profile.h index 7d5357021..d9f9dba3d 100644 --- a/runtime/starpu/include/runtime_codelet_profile.h +++ b/runtime/starpu/include/runtime_codelet_profile.h @@ -25,7 +25,7 @@ #include <math.h> #include <assert.h> -#define CHAMELEON_CL_CB(name, _m, _n, _k, _nflops) \ +#define CHAMELEON_CL_CB(name, _m, _n, _k, _nflops) \ static measure_t name##_perf[STARPU_NMAXWORKERS]; \ void cl_##name##_callback() \ { \ @@ -36,7 +36,7 @@ __attribute__ ((unused)) double K = (double)(_k); \ double flops = (_nflops); \ struct starpu_profiling_task_info *info = task->profiling_info; \ - assert( info != NULL ); \ + if ( info == NULL ) return; \ double duration = starpu_timing_timespec_delay_us(&info->start_time, &info->end_time); \ double speed = flops/(1000.0*duration); \ name##_perf[info->workerid].sum += speed; \ -- GitLab