Optix--How to Quickly Retrieve Image from GPU

Hi Guys,

I am working on a project to simulate camera’s capturing projector light–we’ve written the simulation code using optix but are finding the throughput of the output from the GPU to be unacceptably slow.

I’m working with the sample code in Optix 7.2 running the optixHello program with a buffer width:2560 and height:1920 which produces an single color image thats 191kbs.

Adding timestamps to each stage of the program shows that the output step is taking >400ms to pull the data from the GPU, and we’ve seen similar times when storing images in memory. And this is with both a Nvidia Quadro P1000, and a render using Geforce RTX 2080

I am working on implementing suggestions in these documents:

Is there anything else I can try?

Hi @Peter.Davis,

How are you timing your data transfer? Make sure to put a CUDA syncronize after your launch call, or use CUDA events to time your launch & cudaMemcpy, otherwise your timer is timing your launch and not just the transfer time. Remember, optixLaunch() is an asynchronous function call, it returns immediately.


Thanks David,
I was wondering if the launch was returning immediately!
I will explore that and add more later.