Repository navigation
|
Hi team, I'm learning Pallas with this doc, that's excellent doc for beginner to explore in TPU/pallas world, thank you for it! When I was going through this section, it said "If we have N devices, this means that the final device can be up to N iterations ahead of the first device.", but for the kernel it discussed, I suppose it 2 at most. Because the kernel is a double-buffer kernel, and it use the below code snippet: Which means there is 2 iteration lags at most, because there is only 2 buffers, is my understand correct? |
Replies: 1 comment 1 reply
|
You are correct that the use of Even with For example, suppose N=8 and device 4 pauses forever after signaling its left neighbor on
(I do think we should update the text to say something like "If we have N devices, this means that a device can be up to N/2 iterations ahead of the device farthest from it in the ring.") |
You are correct that the use of
capacity_semprevents one device from running more than one iteration ahead of its immediate neighbors.Even with
capacity_sem, one device can run ahead farther compared to devices that are farther away in the ring.For example, suppose N=8 and device 4 pauses forever after signaling its left neighbor on
capacity_semin step 0. Then:(I do think we should update the text to say something like "If we have N devices, this means that a device can be up to N/2 iterations ahead of the device farthest from …