Concurrent 'launch' on same context possible!?


I was wondering if there is some way in which we could utilize OptiX v3.x to perform concurrent kernel launches with the same Context? I thought about trying it out just to see but its probably easier to ask before writing code.

Basically if we were to call ‘compile’ on the context first (to avoid threading issues there). Once compiled we could then call ‘launch’ for two different entry points in two different threads. What are the possibilities that this is or could be supported within OptiX!?

Also I would assume this may be beneficial on Kepler architecture (Tesla K20) in which there is a huge deal of parallelism and having only a single active kernel may not fully utilize the GPUs potential.


That’s a nice idea, however that absolutely won’t work. There’s a few places in the code where we upload OptiX state to the device. If one thread were to upload data while another was reading it during rendering, it could lead to inconsistent results.

It may not be possible in your situation, but have you considered trying to do multiple things from a single ray generation program?