< Previous post | Next post >

[2025-12-09][Daily]

Does StarPU calibration impact performances?


STARPU_CALIBRATE=0 STARPU_NCUDA=0 STARPU_SCHED=dmda STARPU_TRACE_BUFFER_SIZE=2048 STARPU_GENERATE_TRACE=1 STARPU_FXT_TRACE=1 STARPU_FXT_PREFIX=./traces ./basic_cnn
# and
STARPU_CALIBRATE=1 STARPU_NCUDA=0 STARPU_SCHED=dmda STARPU_TRACE_BUFFER_SIZE=2048 STARPU_GENERATE_TRACE=1 STARPU_FXT_TRACE=1 STARPU_FXT_PREFIX=./traces ./basic_cnn

I was wondering if enabling/disabling STARPU_CALIBRATE (which controls task monitoring to compute performance models) would change a lot the scheduling. On both examples we obtain pretty similar results, over 25 batches. The parallelization is pretty consistent and honestly decent with few waiting times.

Scheduling on CPU with calibrate enabled.
Scheduling on CPU with calibrate enabled.
I did the same experiment but compiling StarPU without blocking drivers (so all CPU are actively waiting for tasks), this did not particularly showed improvements.
Scheduling on CPU with calibrate enabled.

Trying with GPU+CPU, we notice parallelization issues. Our program struggles a lot to parallelize efficiently between the cores and the GPU. We notice big chunks of task (both on CPU and GPU) but then sparsely scheduled task with a lot of waiting times. We might have several problems:

Running on GPU with bigger tasks, we notice no parallelization issue when running on GPU with a bigger dataset (using factice dataset 512x512x3). Our task are >10ms so this is great.

Scheduling on GPU with bigger tasks.

GPU+CPU parallelization show better results when running on bigger tasks, yet we still have some big overheads represented by the brown colors on the graph. Note that I ran this experiment both with and without starpu calibrate and we obtained similar results. This might not affect too much the experiments.

Scheduling on GPU with bigger tasks.

Also these experiments were tested without starpu blocking drivers to see if it would lead to better parallelization, but again here results were pretty similar.

However, we can conclude that bigger task on GPU reduces overhead just as on CPU, and also makes it easier for starpu to schedule tasks between cpu/gpu. It is still not totally perfect though.

< Previous post | Next post >