Configure a Single Task#
Your application might be designed to perform only the task of applying a video effect filter by using a specific GPU in a multi-GPU environment.
In this situation, ensure that the Video Effects SDK does not override your choice of GPU for applying the video effect filter:
// Initialization
cudaGetDevice(&beforeGPU);
vfxErr = NvVFX_Load(eff);
if (NVCV_SUCCESS != vfxErr) { printf("Cannot load VFX: %s\\n",
NvCV_GetErrorStringFromCode(vfxErr)); exit(-1); }
cudaGetDevice(&vfxGPU);
if (beforeGPU != vfxGPU) {
printf("GPU #%d cannot run VFX, so GPU #%d was chosen instead\\n",
beforeGPU, vfxGPU);
}
vfxErr = NvVFX_SetImage() ...
...