In our system, we have 2 GPU and want ImageMagick to use them efficiently. Though, it somehow mostly uses only one of them. Thus, it does not provide an efficient solution. For example,
First GPU's workload: 500 MB / 4 GB
Second GPU's workload: 3000 MB / 4 GB
We plan to use many more GPU's simultaneously and want to make sure ImageMagick will efficiently distribute the workload.
I tried to solve it using this page but I don't know where to exactly put the following codes.
Codes I try to figure out are;
cl_device_id selectedDevice; // OpenCL device used by ImageMagick
InitImageMagickOpenCL(MAGICK_OPENCL_DEVICE_SELECT_AUTO, NULL, (void*)&selectedDevice, exception);
And,
cl_device_id myDevices[4];
cl_uint numDevices;
// Get all the available OpenCL devices from the runtime
clGetDeviceIDs(myPlatform, CL_DEVICE_TYPE_ALL, 4, myDevices, &numDevices);
// ask ImageMagick to use the 3rd device
InitImageMagickOpenCL(MAGICK_OPENCL_DEVICE_SELECT_USER, (void*)(myDevices+2), NULL, exception);
(This is my first question here, sorry if there's something missing. I'd like to provide necessary information, thanks.)