Thanks for the reply!
But I saw that when I run the program with the bottleneck tool, where num_workers is > 0, the GPU “cuda usage” is much more efficient and stable, in the sense that it is always at about 95-100%.
Instead, when I had to run the script normally without the bottleneck tool and num_worker is 0, the GPU cuda usage is more discontinuous (it goes to 50%, to 90% and it turns to 25 and so on), unstable.
So, this behaviour make me think that it has something to do with the gpu usage.