2024-09-12 16:31:05.673574 - Running double_it for x=0
2024-09-12 16:31:05.676543 - Running double_it for x=2
2024-09-12 16:31:05.674209 - Running double_it for x=1
2024-09-12 16:31:05.682710 - Running half_it for x=0
2024-09-12 16:31:05.684880 - Running double_it for x=3
2024-09-12 16:31:05.699523 - Running half_it for x=1
2024-09-12 16:31:05.700610 - Running half_it for x=2
2024-09-12 16:31:05.702510 - Running half_it for x=3
2024-09-12 16:31:06.713485 - Running take_sum
14
⚠️ In this pipeline, double_it and half_it are doubly parallel; both the map is parallel and the two functions are executed at the same time, note the timestamps and the sleep() calls.
1
u/basnijholt Sep 12 '24
Yes! The parallelization happens automatically, both for maps over parameters and for independent nodes. See this example custom-parallelism.
which outputs
⚠️ In this pipeline,
double_itandhalf_itare doubly parallel; both the map is parallel and the two functions are executed at the same time, note the timestamps and the sleep() calls.