Hello. I have measured and compared the GPU memory allocated by a simple program that performing a basic Optix initialization and one IAS build with a single instance and no geometries at all. This program allocated 0.6 GB of dedicated GPU memory on an RTX A5000, and 1.2 GB (the double) on an RTX 5000 ADA.
I provide below the code that I have used:
CUstream stream{};
OptixDeviceContext optixContext{};
cudaSetDevice(0);
cudaFree(0);
cudaStreamCreate(&stream);
optixInit();
optixDeviceContextCreate(nullptr, 0, &optixContext);
OptixInstance optixInstance{};
optixInstance.visibilityMask = 255;
OptixAccelBuildOptions iasBuildOptions{};
OptixBuildInput iasBuildInput{};
CUdeviceptr instanceBuffer;
cudaMalloc((void**)&instanceBuffer, sizeof(OptixInstance))
cudaMemcpy((void*)instanceBuffer, &optixInstance, sizeof(OptixInstance), cudaMemcpyHostToDevice)
iasBuildInput.type = OPTIX_BUILD_INPUT_TYPE_INSTANCES;
iasBuildInput.instanceArray.instances = instanceBuffer;
iasBuildInput.instanceArray.numInstances = 1;
iasBuildOptions.buildFlags = OPTIX_BUILD_FLAG_ALLOW_UPDATE;
iasBuildOptions.motionOptions.numKeys = 1;
iasBuildOptions.operation = OPTIX_BUILD_OPERATION_BUILD;
OptixAccelBufferSizes iasBufferSizes;
optixAccelComputeMemoryUsage(optixContext, &iasBuildOptions, &iasBuildInput, 1, &iasBufferSizes));
CUdeviceptr iasBuildTempBuffer;
cudaMalloc((void**)&iasBuildTempBuffer, iasBufferSizes.tempSizeInBytes)
CUdeviceptr iasBuffer;
cudaMalloc((void**)&iasBuffer, iasBufferSizes.outputSizeInBytes)
OptixTraversableHandle iasHandle{};
optixAccelBuild(optixContext, stream, &iasBuildOptions, &iasBuildInput, 1, iasBuildTempBuffer, iasBufferSizes.tempSizeInBytes, iasBuffer, iasBufferSizes.outputSizeInBytes, &iasHandle, nullptr, 0u));
Just before the call to optixAccelBuild, the GPU memory taken is about 0.3 GB on both cards. But just after the call, the GPU memory taken is much more on the ADA GPU. Do you have an explanation of this pretty high memory consumption for the ADA GPU, or do you know if this could be fixed with more recent versions of Optix, Cuda, or drivers updates? I am using Optix 7.3, Cuda Toolkit 11.8, and latest drivers.