Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
22nd September 2018, 17:48 | #1 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
Parallelization of GPUs
What is the best practice to 'rotate' GPUs for filters that use the GPU?
I changed some py scrips adding a GPU parameter on invocation, but how to segment frames to distribute the work? SelectEvery() is a way to segment them but the downside is that this won't work for filters that use neighboring frames. Selecting frames based on the modulus of the frame number would avoid that. Using something similar to FrameEval would accomplish this if input parameters to filters could be passed on. Alternatively, VS could perhaps expose a GPU_ID by thread. What are the possible solutions? Last edited by Cary Knoop; 22nd September 2018 at 18:19. |
4th October 2018, 16:18 | #2 | Link |
Cary Knoop
Join Date: Feb 2017
Location: Newark CA, USA
Posts: 397
|
If Vapoursynth would expose a (pesudo) thread processing variable one could assign GPUs based on some modulo function.
i.e. clip = myGPUfunc(clip, ........., device_id= core.current_thread % max_gpu) |
4th October 2018, 17:10 | #3 | Link |
Guest
Posts: n/a
|
Why would it need to be added to Vapoursynth? Can't you just use something like the Python multiprocessing library to do what you want? Unlike Avisynth, you're not hamstrung by only what Vapoursynth core exposes. You have a full programming language at your disposal.
Last edited by amichaelt; 5th October 2018 at 15:49. |
|
|