ufrisk / MemProcFS

MemProcFS
GNU Affero General Public License v3.0
2.81k stars 352 forks source link

Can the same process open two devices at the same time and use them together #212

Closed DIXIN20 closed 10 months ago

DIXIN20 commented 10 months ago

Can the same process open two devices at the same time and use them together

ufrisk commented 10 months ago

Hi and many thanks for the sponsorship 💖

The answer to this question is No and Yes...

It's not supported to use two devices at the same time and automatically load balance between them which is what you're asking for.

It is however supported to use two devices at the same time if they are used in two separate instances, i.e. two VMMDLL_Initialize calls with two different handles returned. You may select device with fpga://devindex= as described here.

If I were to support it in a single instance it would not do anything to latency though, and it wouldn't do anything for looking up pointer chains and such though. It would better top speed though. Also, it would be quite a lot of job to do a good job around this so I don't have this feature planned.

As a workaround you could manually load-balance though using two MemProcFS instances (even in the same process).

DIXIN20 commented 10 months ago

OK, thanks

ufrisk commented 10 months ago

I know it's not the ideal answer, but I hope that you should at least be able to use the two instances of MemProcFS solution to manually load balance your requests. In theory you should be able to get double performance as in MB/s, but unfortunately no improvements around the lowest latency.

Best wishes with this project and please let me know should you run into some road blocks 👍