10
$\begingroup$

I've been struggling a little with Cycles and my GeForce GTX 750 graphic card. Most of the time it works well, but when I try to work with scenes that have custom shaders (like a skin shader with multiple textures, including for displacement), I get an error, both on the viewport and at rendering:

Cancel | CUDA error: Out of memory in cuLaunchKernel(cuPathTrace, xblocks, yblocks, 1, xthreads, ythreads, 1, 0, 0, args, 0)

Or something like that. Here's a screenshot so you can check it out:

enter image description here

I'm using a PC and Windows 7, with 8Gb of RAM. I can't render this scene with GPU, but using CPU, it renders ok.

My question is: What is causing this issue? I have the latest drivers installed for my graphic card, so I have no idea what this is.

$\endgroup$
  • $\begingroup$ Have you got the experimental feature set turned on, just above where you choose whether to render with cpu or gpu? I got those sort of visual errors when I switched it on, switching back to 'supported' fixed it. $\endgroup$ – Ray Mairlot Oct 31 '14 at 18:57
  • $\begingroup$ Hey, @RayMairlot, thanks for the reply! I did render when I switch from experimental to supported, but I'm using the SSS shader in one of my shaders, which just works with the experimental feature. Maybe when SSS works with supported it will work ok, but for this particular scene, it isn't optional for me! :( $\endgroup$ – Diego de Oliveira Oct 31 '14 at 19:04
  • $\begingroup$ Not sure what version it was introduced, but certainly with 2.72b you can CPU render SSS shaders. $\endgroup$ – Ray Mairlot Oct 31 '14 at 19:09
  • $\begingroup$ @RayMairlot you are right, it works ok with CPU, which is what I did to render this scene at the end. But CPU takes more time than GPU, an this is the whole point of my question: to make this scene work with GPU and SSS shader. $\endgroup$ – Diego de Oliveira Oct 31 '14 at 19:13
  • $\begingroup$ youtu.be/1fDIyx9py6Q me helped here is this way to $\endgroup$ – Иван Злющий Призлющий Oct 29 at 18:59
7
$\begingroup$

The short answer is that SSS on the GPU eats up a lot of memory, so much so that it is recommended to have more than 1 GB of memory on for your GPU. This was mentioned in one of the videos from the Blender Conference (unfortunately I can't remember which one). Updating your drivers won't really help as that can't add more memory, so for now you are stuck with having to render on the CPU. If you have multiple objects that have SSS shaders on them then you could try just rendering one at a time and then compositing them back together.

$\endgroup$
  • 1
    $\begingroup$ Thanks for the answer, @BlendingJake! For what I'm seeing, my GTX 750 has only 1Gb of memory, so the only way to solve this without touching the scene is to get a better graphic card, right? $\endgroup$ – Diego de Oliveira Oct 31 '14 at 20:09
  • $\begingroup$ Correct @DiegodeOliveira! I don't know your budget, but you could check out something like the GTX 750 ti or GTX 760 if you aren't looking to spend a crazy amount. This link has CPU/GPU SSS tests: blenderartists.org/forum/… $\endgroup$ – BlendingJake Oct 31 '14 at 20:34
  • $\begingroup$ Thanks for the link, @BlendingJake! I think that I'll try to upgrade to a GTX 760 whenever it'll be possible. $\endgroup$ – Diego de Oliveira Oct 31 '14 at 20:44
  • $\begingroup$ glad to help @DiegodeOliveira $\endgroup$ – BlendingJake Oct 31 '14 at 20:57
2
$\begingroup$

I assume you are using the same graphics card for both display and compute/rendering. If so you could use hundreds of megabytes to windows and applications for display purposes.

If you then attempt to render with cycles it needs to allocate another chunk of memory in order to support running a program ( cycles ) on your GPU and on top of that all the scene data and textures.

This first bit of memory we cannot accurately measure currently. But it is the case that running an experimental kernel uses significantly more memory then the normal one ( again can be multi hundreds of megabytes).

So if you are unlucky and have a 2GB graphics cards you might only be able to use 700 mb of ram for textures + the scene data ( this is what blender measures and reports ). If you go over this you might place the card into a mode where it can no longer allocate enough for displaying and this might result in artefacts like the ones you show in the screen-shot.

$\endgroup$
  • 1
    $\begingroup$ Hey, Martjin, thanks for your detailed answer! Very instructive. I didn't know about this limitation for textures plus scene data! $\endgroup$ – Diego de Oliveira Nov 3 '14 at 19:30
1
$\begingroup$

I have a NVidia GTX 980 ti and I have been getting the same "CUDA out of memory error" that everyone else is getting.

I have no idea what's causing it but I noticed it only occurs if the viewport is set to "rendered" when I try to render F12 a scene or animation.

$\endgroup$
1
$\begingroup$

I found that reducing tile size (under the performance tab in the render tab) will reduce memory usage. This will be slightly slower (https://youtu.be/8gSyEpt4-60?t=671) but will consume less ram, and allow the render to complete.

$\endgroup$
0
$\begingroup$

Sounds like the same Issue as I have with cuCtxCreate, I found out that it hs something to do with the Memory transfer rate of the graphics card, the workaround that I did is to lower the Memory Transfer Rate offset. though I am using Linux Fedora 25 and tweak some files in order for me to lower it in nvidia X server.

  • my current transfer rate is 810Mhz both min and max

My proof of this is that I can now run GPU rendering without error, though what I'm rendering right now might not even come close to what you're rendering, Graphics card wise.

[my temp reached up to 61 in this render, with a electric fan to cool down my laptop

I have dedicated nvidia Gt640m 2Gb. by the way have you tried to check the blenders console? you might find something useful in that console that can help you.

The idea wasn't mine I'm only sharing what I experienced and hope that I could share it and help someone, Lowering your GPU's Memory Transfer Rate offset is up to you, cause to me it's like I'm playing 2 AAA games in a frying pan disguised laptop, my GPU temp reached up to 81 degree Celsius at first try no electric fan to cool off my laptop.

$\endgroup$
0
$\begingroup$

I solved the problem by doing the rendering using CPU+GPU in Blender 2.8 (linux, Ubuntu). You have to install nvdia driver from nvidea in update menu.

$\endgroup$
0
$\begingroup$

My previous message was only a temporary solution and as my file got bigger I had to do losts of trick not to get this CUDA error / stop the program crashing during rendering. I only have problems with rendering in render image mode (F12) and rendering in viewport never causes any problems. For animation and less fireflies I need rendering render mode unfortunately. My drawing is 1 GB now and 11 GB video card and 16 GB internal memory is not enough to render without using harddisk as memory.

steps to improve the situation: - use alt d instead of shift d to use copy of object and keep file smaller as alt d doesn't increase file size. - don't use HDR and the best is to choose as background RGB input. - Use the decimate modifier for object with lots of verticate. I could reduce number of verticates for some object by 70 % with hardly visible less quality. You can also bake normals for bigger decrease in object size with less loss in quality. - Even after doing all this I got problems again and solved this by increasing swap file size with 32 GB on ubuntu.

If I get problems again guess I will try using rendering services where you sent what you want to render and can download the result when ready.

$\endgroup$
0
$\begingroup$

I am running 3 graphics cards in my system. 1 2g and 2 4g. I kept getting the cuda out of memory error. After reading through these postings I realized that by disabling my 2 g card (primary display) from the cuda stack it works fine now. My primary display card was running out of memory and blender couldn't utilize the other two.

So, try disabling your primary display card from the Cuda stack and see if that helps.

$\endgroup$
  • $\begingroup$ Note that if the cards have cards with different amounts of vRAM, blender will only use as much vRAM as the smallest of the cards. If you have 1 card with 2GB and 2 with 4GB, blender will only use 2GB on each of the cards to render. $\endgroup$ – cegaton Mar 3 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.