is that the answer even to the example I posted here: How to parallelize a loop over the samples of a batch - #7 by Brando_Miranda 85 ? @albanD

related links from research:

Multiprocessing for-loop on CPU
How to use multiprocessing in PyTorch? - Stack Overflow 19
How to parallelize a loop over the samples of a batch - #7 by Brando_Miranda 85
machine learning - How to parallelize a training loop ever samples of a batch when CPU is only available in pytorch? - Stack Overflow 5