OptiX 7.0.0 memory error

Hi!
This may be a basic question, but I would appreciate an answer.

Is there a limit to the number of rays in OptiX 7.0.0?

I am using IAS and GAS to move a polyhedral model to multiple postures, and ray tracing is performed on each of them to determine contact. However, as the number of rays and postures increase, the “out of memory” GPU memory is exhausted.

I can’t solve this problem, and I thought there might be something wrong with it as well as the limitation on the number of triangle polygon inputs.

PC spec

RTX 3090

OptiX 7.0.0

CUDA 10.2

Welcome!

A lot more information about your scene setup and size, launch dimensions, and the ray tracing programs and their algorithm would be required to be able to tell exactly why you run into out of memory (OOM) issues.
Also when does that happen? Before launching or inside a launch?

There are a number limits in OptiX 7 for the number of primitives in a GAS, the number of instances in an IAS, the number of launch indices, etc.

You should check the following things:

I am using IAS and GAS to move a polyhedral model to multiple postures, and ray tracing is performed on each of them to determine contact. However, as the number of rays and postures increase, the “out of memory” GPU memory is exhausted.

I would generally recommend to update to the latest available OptiX SDK release (7.3 at this time). Please read the OptiX Release Notes for changes to the API and required display drivers. There have been some small API changes to the IAS AABB field (removed) and the denoiser.

I’m sorry for the delay in checking various factors. Based on the answer of “Optix 7.0 memory error”, I think the problem may be in the process of moving triangle polygons using IAS.
In my program, I keep calling a single rotation matrix in a 「for」 statement. I kept overwriting one IAS and performing ray tracing on the moved solid.
I know from the program guide [5.5 Relocation] that I need to reposition the IAS, but I don’t know how to do it.
I can do one move in the sample program.
画像1

First, if you get an out of memory error because you’re constantly rebuilding the acceleration structure, make sure that you correctly manage the underlying CUDA allocations for all CUdevicptr used on those steps.
Otherwise you’re leaking VRAM memory and it would not be surprising that there is an OOM condition after some time.

If you change the matrix inside an instance to transform that underlying IAS or GAS, then the IAS either needs to be rebuild or updated (refitted) before the next launch.
Both is done with the optixAccelBuild() call using different build operations.
You must do that for every acceleration structure which changed and for each IAS which is above any changed acceleration structure up to the root AS of your scene.

If you search the OptiX SDK examples for OPTIX_BUILD_OPERATION_UPDATE you’ll find examples doing that.
One of my OptiX 7 advanced examples is also showing that inside the intro_motion_blur updateAnimation() function.

AS relocation has nothing to do with that! That only needs to be done whenever you copy or move the CUDA data of an AS pointed to by a CUdeviceptr to another pointer.