Memory allocation failed

Hello,
I got an error when I used the optix code.

terminate called after throwing an instance of ‘optix::Exception’
what(): Memory allocation failed (Details: Function “RTresult _rtContextLaunch2D(RTcontext, unsigned int, RTsize, RTsize)” caught exception: Out of memory)

it may because of this line of code:
_ctx->launch(Entry_SbrFreqPrimary, grid.x, grid.y);
where _ctx means context.

can you give me some suggestion?

thanks a lot!

Out of memory on device side could happen if the acceleration structure and/or the rendering data (buffers, textures, stack size, launch size) took more VRAM than you have available on your board.

For more educated guesses you would need to provide some more information about the amount of data you’re working with (e.g. number and type of primitives, buffer and texture amount used altogether, stack size, launch size, etc.) and your system configuration.

When reporting OptiX issues please always list the following system information as well which will reduce the turnaround times and accuracy of answers:
OS version, installed GPU(s) and VRAM amount, display driver version, OptiX version, CUDA toolkit version used to generate your OptiX PTX code.