From b9cb642ad074d8a5fbee1dedde3beabc50158424 Mon Sep 17 00:00:00 2001 From: cpt-harlock Date: Thu, 23 Jan 2025 14:35:17 +0100 Subject: [PATCH] error defining time_sample_gpu even if nvidia not enabled --- src/sampling.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sampling.c b/src/sampling.c index 87ca9f2..42bc1fb 100644 --- a/src/sampling.c +++ b/src/sampling.c @@ -797,6 +797,7 @@ HIDDEN void time_sample_sys_energy(int prev, int curr, int init, double energy_p } } +#ifdef NVIDIA_GPU HIDDEN void time_sample_gpu(int prev, int curr, int init, unsigned int util_gpu[MAX_NUM_GPUS], unsigned int util_mem_gpu[MAX_NUM_GPUS], unsigned int temp_gpu[MAX_NUM_GPUS], unsigned int clock_gpu[MAX_NUM_GPUS], double energy_gpu[MAX_NUM_GPUS]) { static uint64_t energy_gpu_s[2][MAX_NUM_GPUS] = { 0 }; @@ -842,3 +843,4 @@ HIDDEN void time_sample_gpu(int prev, int curr, int init, unsigned int util_gpu[ cntd->gpu.clock[i] += clock_gpu[i]; } } +#endif