June 2018
Intermediate to advanced
546 pages
13h 30m
English
Python includes the multiprocessing (most of the time abbreviated to just mp) module to support process-level parallelism and the required communication primitives. In our example, we'll use the two main classes from this module:
mp.Queue: Concurrent multi-producer, multi-consumer FIFO queue with transparent serialization and deserialization of objects placed in the queuemp.Process: A piece of code that is run in the child process and methods to control it from the parent's processPyTorch provides its own thin wrapper around the multiprocessing module, which adds the proper handling of tensors and variables on CUDA devices and shared memory. It provides exactly the same functionality as the multiprocessing module from ...
Read now
Unlock full access