Multi-GPU processing inconsistent.
Posted by The.Scotsman on Jan 23, 2014; 9:48pm
URL: https://forum.jogamp.org/Multi-GPU-processing-inconsistent-tp4031306.html
An algorithm used compares a list of objects A,B,C... to each other.
i.e. A-B, A-C, B-C, etc.
The jogmap code uses:
CLCommandQueuePool.invokeAll(List<CLTask>)
...where each CLTask.execute() has (in simplified format):
CLContext = CLSimpleQueueContext.getCLContext()
CLCommandQueue = CLSimpleQueueContext.getQueue()
CLBuffer = CLContext.createFloatBuffer(n, CLMemory.Mem.READ_WRITE)
CLBuffer = CLContext.createFloatBuffer(m, CLMemory.Mem.READ_ONLY)
CLKernel = CLSimpleQueueContext.getKernel("myKernel")
CLCommandQueue.putWriteBuffer(CLBuffer, false);
CLCommandQueue.put2DRangeKernel(CLKernel, ...)
CLCommandQueue.putReadBuffer(n, true)
I've run this on several different single GPU configurations (both AMD and NVidia), and the results are always correct.
However, when it's been run on multi-GPU configurations (both AMD and NVidia), the results are randomly incorrect.
(about 95% correct, 5% incorrect).
There is nothing within the CLTask above that can "bleed through" to other CLTask's except possibly the CL calls.
Obviously, at a given time, both an A-B and an A-C comparison could be performed at the same time on different devices.
So the question is: Am I doing this correctly?
Many thanks.