Multi-GPU via threading instead of processes #50
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP towards using one-GPU-per-thread instead of one-GPU-per-process. The big advantage is you don't need to launch multiple processes (which is slow and at least doubles the startup time) and memory can be shared between the GPUs using unified memory, instead of having to be serialized and distributed between the different processes (which necessarily passes through the CPU memory).
Right now this works:
although MAP and sampling is still WIP.
Right now this needs CUDA 11.2 and my branch of CUDA.jl https://github.com/marius311/CUDA.jl/tree/no_gc_ctx_switch