POETSII / tinsel

Manythread RISC-V overlay for FPGA clusters
Other
35 stars 1 forks source link

How are sub-boxes allocated/shared in 0.6? #80

Closed m8pple closed 4 years ago

m8pple commented 5 years ago

For tinsel 0.6 we can specify the number of boxes in the HostLink constructor:

HostLink::HostLink(uint32_t numBoxesX, uint32_t numBoxesY);

and we have a 2x1 box config with Byron+Eliot (or is it 1x2 ?).

One thing I wasn't clear on is what happens if two people try to allocate a 1x1 board system - does it allow both to succeed via some kind of allocation algorithm? Either in the current implementation, or as a plan for a future implementation with the same API.

Also, once we have a 2x2 system, it might make sense to prioritise a particular 2 box config (either 2x1 or 1x2), in order to maximise the likelihood of sharing (by minimising fragmentation effects). Is one more efficient than the other?

mn416 commented 5 years ago

Hi @m8pple,

Byron+Eliot is a 1x2 box setup.

One thing I wasn't clear on is what happens if two people try to allocate a 1x1 board system - does it allow both to succeed via some kind of allocation algorithm?

So a 1x1 board setup can't really be requested -- except by requesting a 3x2 board setup and just using one of the boards.

For boxes, if a 1x1 box app is started from Byron, and another 1x1 box app is started from Eliot, then both will run conflict-free.

If a 1x2 box app is started from Byron, and a 1x1 box app is started from Eliot, then there will be a conflict -- one box will win the race to claim Eliot, and the other will abort immediately with an error message "box in use". This hard abort should probably be softened in future, but the caller can check the return value of the app to see if it succeeded.

Also, once we have a 2x2 system, it might make sense to prioritise a particular 2 box config (either 2x1 or 1x2), in order to maximise the likelihood of sharing (by minimising fragmentation effects). Is one more efficient than the other?

Yes, 1x2 is probably more efficient than 2x1. The former gives 3x4 boards, the latter gives 6x2 boards.

As things stand, the 2x2 box config would allow:

Basically, from any box B in the mesh, you can have any rectangle of boxes in which B is at the bottom left corner of that rectangle.

So yes, quite a lot of possibilities and limiting it could reduce box pressure. Some kind of batch processing system would be good -- we can probably use something off-the-shelf, but I haven't had a look yet.