No reason for GPU to be "cuda out of memory" or slower then CPU

No reason for GPU to be "cuda out of memory" or slower then CPU

alexKLTZK
Explorer Explorer
1,393 Views
14 Replies
Message 1 of 15

No reason for GPU to be "cuda out of memory" or slower then CPU

alexKLTZK
Explorer
Explorer

Hi,

 

first time in the forum. I've been using VRED Design at work for a few years now. 
The introduction to GPU raytracing for VRED Design has been such a gamechanger but with a twist...


I'm currently having a problem with a few files and GPU raytracing and I can't understand what is wrong with them and would like to understand what do if the problem appears again for other files. Either its "cuda out of memory" or it just render super slow with GPU but much faster with CPU sometimes. Hardware is no issue. I have 16 GB VRAM, 64 GB RAM and a 24 core CPU. New GPU driver is installed. The file is built up like any other file I use, same product group, same amount of geometry, similar amout of materials inside, similar lighting set up with HDRI and a few physical lights, even the file size is smaller then others. I tried using optimize but the result is the same. I tried with VRED Design 2025 and 2026. Same result. Sometimes these files even eat up my whole RAM which even makes the PC freeze sometimes. What could be the reason for it and what am I not seeing here or what can I do/try/check?

 

Another problem I always get with GPU raytracing:

Why is the GPU cache clogging up so fast and why is there no option to clear the GPU cache in VRED Design manual?  I dont want or can't save and reopen the file everytime. With some files it takes some minutes to do both. 

 

Thanks in advance

0 Likes
1,394 Views
14 Replies
  • gpu
Replies (14)
Message 2 of 15

michael_nikelsky
Autodesk
Autodesk

Hi,

 

usually the Cuda out of memory error is exactly that, you are not having enough memory to hold the whole scene on the GPU. This is most likely also the reason why things are slow because before Cuda runs out of memory on a single GPU it will swap to main memory and while that still renders it is just incredibly slow. 16 GByte are not a lot, larger datasets need significantly more memory and once you also have a couple of HDRs in your scene it is not uncommon to use up 32 or more GBytes of GPU memory. Without knowing your datasets it is impossible to know though.

 

There are a couple of preference settings you should set to reduce the risk of this happening though:

- Clear GPU Memory: This should be enabled so when switching from OpenGL to GPU-Raytracing the data is removed from OpenGL memory, freeing up the space for use in the raytracer

- Use GPU Texture Compression: What the name says, it compresses textures before uploading them to the GPU. This makes initialization of the raytracer slower since compression takes a while but it can help freeing up some memory

- Optimization Mode: Set this to Optimize Memory Consumption. This will remove invisible Geometries from GPU memory, otherwise everything is uploaded to have faster variant switching performance.

 

Hope this helps

Kind regards,

Michael

 

 



Michael Nikelsky
Sr. Principal Engineer
0 Likes
Message 3 of 15

alexKLTZK
Explorer
Explorer

Hi, 

thanks for the response. I know its hard to tell without knowing the details of each scene I'm talking about. The scenes I'm talking about are not complex, not many materials,  no DOF, just footprint views. As I've mentioned I have a similar scenes/ shots, similar lighting, the object has even a bit more geometry and details but it renders in 30s, while the problematic scenes can't even be rendered with GPU in the same time or without crashing. I really don't think these scene require 32 GB at all. That would not make any sense. Maybe I just have to recreate the scene and check again.

Thanks for the tips but...
-Clear GPU memory is not available in VRED Design for whatever reason, as I've said
-Optimization Mode didn't give any improvements, as I've said
-Found GPU texture compression in VRED Design 26, but know the PC just shuts down when turning on GPU. 

Thanks


0 Likes
Message 4 of 15

michael_nikelsky
Autodesk
Autodesk

Oh, you are right about the Clear GPU memory option. So one thing you should do then is start the GPU Raytracer before you load the scene, this should have the same effect.

But the PC shutting down when the texture compression is enabled worries me a bit, this should not happen at all and hints at a driver bug.

What you can do is check the GPU memory usage to see how much memory is actually used.



Michael Nikelsky
Sr. Principal Engineer
0 Likes
Message 5 of 15

alexKLTZK
Explorer
Explorer

Maybe it's unrelated that the PC shutted down after enabling it. Haven't tried without. But I also found out, that using VRED Design 2026 is currently not an option, as its destroying all my fabric materials. 

Tried the workflow with having GPU on before opening the file..No difference. GPU render progress stays at 0% and VRED starts freezing and crashes. 

0 Likes
Message 6 of 15

lauri_barnhart
Autodesk
Autodesk

Hi @alexKLTZK,

I wanted to check in and see if you still needed assistance, or if you found a solution to your question already? Let us know if you need further assistance by providing an update or if you have found a solution, please share it with the community so other members who may have the same question could learn from your experience.

All the best,

Lauri | Community Manager


Lauri | Community Manager
0 Likes
Message 7 of 15

michael_nikelsky
Autodesk
Autodesk

Regarding the Wovencloth and Velvet materials you should get a dialog when loading the scene that asks if you want to convert them or not. Vulkan does not support these materials and since they violate physics in various aspects we don´t encourage using them anymore. However, if you don´t convert them, GPU and CPU raytracing should work just like before.



Michael Nikelsky
Sr. Principal Engineer
0 Likes
Message 8 of 15

alexKLTZK
Explorer
Explorer

No solution found yet. I unfortunately can’t share the files here. Will have to dissect and check the files for errors when I have time. 

0 Likes
Message 9 of 15

alexKLTZK
Explorer
Explorer

Thanks. Will check in on it again when I reinstall it again at some

point

0 Likes
Message 10 of 15

lauri_barnhart
Autodesk
Autodesk

Hello, @alexKLTZK,

Did the information provided by @michael_nikelsky help you and answer your question?

If yes, please click on the "Accept Solution" button on the post(s) that solved your problem. This will assist other community users in finding and benefiting from this information.

If not, please do not hesitate to give an update in this thread so all community members receive an update on the progression of your question, and can suggest next steps that may be helpful for you to achieve what you're looking for.

All the best,

Lauri | Community Manager


Lauri | Community Manager
0 Likes
Message 11 of 15

alexKLTZK
Explorer
Explorer

No. It was unrelated to my problem

0 Likes
Message 12 of 15

alexKLTZK
Explorer
Explorer

I honestly don't whats wrong with this software. The GPU performance is varying every day and hour . I never had these kind of problems with Blender. Sometimes it renders super fast and other times 10 times as long without changing anything in the scene. Nothing else open except VRED + a restart of the PC to clear the chache doesnt change anything . 

0 Likes
Message 13 of 15

michael_nikelsky
Autodesk
Autodesk

This still sounds like an out of memory situation. Depending on when this happens, the results are different. If the buffers for rendering the image are properly allocated on the GPU, performance often doesn´t suffer too much if some geometries are moved to CPU memory. On the other side, if these buffers get allocated in normal RAM the performance will be terrible, even on a PCIE 5 system. 

Take a look at the GPU memory information we provide in the Help menu, if that gets close to the limit of the GPU you can expect bad behavior. 



Michael Nikelsky
Sr. Principal Engineer
0 Likes
Message 14 of 15

richardlevene
Collaborator
Collaborator

@alexKLTZK have you created a an official autodesk support ticket for this?
it will help and you can have them sign an nda and share your scene with them. they have to have the scene really to properly debug the issue. it is very hard otherwise.
can you also state what gpu and what driver version you are using?

0 Likes
Message 15 of 15

lauri_barnhart
Autodesk
Autodesk

Hi @alexKLTZK,

I wanted to check in and see if you saw @richardlevene's follow up requests to start an Autodesk support ticket and to share what GPU and driver version you are using?  Support can be found here: https://www.autodesk.com/support or you can use the Autodesk Assistant also.

 

 

Please let us know how else we as community can help you resolve the issue. 

 

Thank you for being a part of the community!


All the best,

Lauri | Community Manager


Lauri | Community Manager
0 Likes