I’m implementing Progressive Photon Mapping using the new approach by Knaus and Zwicker (http://www.cs.jhu.edu/~misha/ReadingSeminar/Papers/Knaus11.pdf) using OptiX. This approach makes each iteration/frame of PPM independent and more suitable for multi-GPU.
I understand that OptiX can support multiple GPU, but I am a bit unclear on how it does it. It seems to just do half the screen on one GPU, and one on the other, or some more sophisticated way of partitioning a single frame on multiple GPUs.
What i do is trace a number of photons and then store them in a buffer. The photons are then sorted into a spatial hash map using CUDA and thrust, never leaving the GPU. If i use one GPU then of course all photons are stored on one device. If i use multiple GPU’s then i imagine that the buffer is split across several GPU’s. On a map to host, these buffers are combined into a single CPU buffer. I want to do the spatial hash map creation on GPU since it is the bottleneck of my renderer. Any more insight into how multi-GPUs in OptiX would be appreciated, I find that the programming guide and API don’t touch upon this issue.
What i would acutally like to do is let one GPU do one frame, while the next GPU does the next frame. I can then combine the results, for instance on the CPU or on one of the GPU’s in a combine pass. Is this somehow possible? For instance, could I create two OptiX contexts mapping to each device on two different host threads. This would allow me to do the CUDA/thrust spatial hash map generation as before, assuming the photons are on one device, and merge the two generated images at the end of the pipeline.