Hello folks! I’m reading the multiprocessing documentation and found what seems to be conflicting information. Specifically, this page states that:
Even if you have a pool of processes sending data to a single one, make it send the buffers back - this is nearly free and will let you avoid a copy when sending next batch.
However, in my understanding, this other page is incisive in recommending the opposite:
Don’t pass received tensors.
# not going to work x = queue.get() queue_2.put(x) # you need to create a process-local copy x = queue.get() x_clone = x.clone() queue_2.put(x_clone)
Could someone help me understand what I’m missing here?