Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU scheduler could be smarter #82

Open
sakridge opened this issue Sep 15, 2020 · 1 comment
Open

GPU scheduler could be smarter #82

sakridge opened this issue Sep 15, 2020 · 1 comment

Comments

@sakridge
Copy link
Member

The GPU work scheduler just does a round-robin approach with multiple GPUs. This is not so good if you have a big disparity of GPU performance. Say you have one slow GPU and one fast GPU. You will schedule the work 50/50, but the slow one will be bringing down the overall latency.

Also, the schedulers are somewhat disparate for PoH/sigverify. A unification of these could both give smarter scheduling and less code.

@AndreaLanfranchi
Copy link

Make use of pinned memory area.
Let's say one byte for GPU where 0x01 means busy and 0x00 means free.
Host (CPU) launching kernel will pick the index of first "free byte" which correponds to the ordinal position of the GPU eventually setting to busy. GPU kernel when returning (or when grid exhausted) sets its byte to free.
This way you always pick the first available gpu.

(not read the full code though so a lot of salt is needed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants