iRay won't use GPU

Dave McHDave McH Posts: 49

[iRay won't use GPU}] That's pretty strange as iRay uses CPU, it starts, calculates and at the last moment starts rendering with CPU.

In settings CPU always unchecked, I use script to check VRAM consumption and it shows 2.9Gb (gpu has 4Gb).

Scene not something big or complicated, just a road, bridge, couple of trucks and HDRI light.

Here warnings from log file, not really understand what's going on

2018-09-20 23:37:42.003 WARNING: dzneuraymgr.cpp(307): Iray ERROR - module:category(IRAY:RENDER):   1.2   IRAY   rend error: Unable to allocate 134217728 bytes from 17227776 bytes of available device memory2018-09-20 23:37:42.058 WARNING: dzneuraymgr.cpp(307): Iray ERROR - module:category(IRAY:RENDER):   1.3   IRAY   rend error: CUDA device 0 (GeForce GTX 1050 Ti): Scene setup failed2018-09-20 23:37:42.058 WARNING: dzneuraymgr.cpp(307): Iray ERROR - module:category(IRAY:RENDER):   1.3   IRAY   rend error: CUDA device 0 (GeForce GTX 1050 Ti): Device failed while rendering2018-09-20 23:37:42.058 WARNING: dzneuraymgr.cpp(307): Iray WARNING - module:category(IRAY:RENDER):   1.3   IRAY   rend warn : All available GPUs failed.2018-09-20 23:37:42.058 Iray INFO - module:category(IRAY:RENDER):   1.3   IRAY   rend info : Falling back to CPU rendering.2018-09-20 23:37:42.058 WARNING: dzneuraymgr.cpp(307): Iray ERROR - module:category(IRAY:RENDER):   1.3   IRAY   rend error: All workers failed: aborting render

 

Untitled.jpg
713 x 628 - 87K
Post edited by Richard Haseltine on

Comments

  • Iray will fall back to the CPU if the GPU fails, even if it would not otherwise use the CPU, so that is not unexpected. How big are the textures files for the scene?

  • Usually because your scene takes too much GPU RAM. Also, each one of the render windows you keep open takes up GPU RAM too. So if there are too many render windows open it can also fail to use the GPU.

  • Dave McHDave McH Posts: 49
    edited September 2018

    As I see it takes 2.2 Gb of vram. But in resource monitor I see it takes all my ram for some reason. But there is no reason why it needs 16Gb! Memory leakage perhaps?

    Here a screenshot, Daz just ate all my RAM

    Untitled2.jpg
    411 x 1219 - 212K
    Post edited by Dave McH on
  • ebergerlyebergerly Posts: 3,255
    If you have W10 you can see exactly how much GPU VRAM is being used by each process. Maybe other processes are using VRAM. Go to the Task Manager Details tab and rt-click to add GPU monitoring columns.
  • ebergerlyebergerly Posts: 3,255
    edited September 2018
    That screenshot of CPU RAM usage looks like what happened to me when they released a buggy Malwarebytes update that gobbled ALL my RAM . I'd check to verify exactly what processes are using the RAM
    Post edited by ebergerly on
  • ebergerly said:
    That screenshot of CPU RAM usage looks like what happened to me when they released a buggy Malwarebytes update that gobbled ALL my RAM . I'd check to verify exactly what processes are using the RAM

    No, it used by Daz, when you press render it takes 1-3 min before first image appears, so durig that time it goes up to that value. When I stop rendering it goes down.

  • ebergerlyebergerly Posts: 3,255
    edited September 2018
    Maybe a buggy scene? Did you try with a different one? 3GB of GPU VRAM usage should only use around 9GB of system RAM or less.
    Post edited by ebergerly on
  • ebergerlyebergerly Posts: 3,255
    BTW, theres nothing strange about taking 1-3 minutes or more after hitting render for an image to appear. Thats normal since the scene needs to first fill the RAM and then be transferred over PCI to the GPU. That takes a long time.
  • So, what I did so far...

    Installed new drivers and reinstalled Daz- zero result.

    Reduced resolution of textures- still nothing.

    Removed all maps on the scene- so now it takes 5gb ram and iRay render starts with no problem, unless everything is gray now :)

  • ebergerlyebergerly Posts: 3,255
    Did you try a different scene?
  • ebergerly said:
    Did you try a different scene?

    Yeah, works fine with another one.

    But if problem in this particular scene, how can I find "defective" part? Are there any tools for that?

  • ebergerlyebergerly Posts: 3,255
    I would just start removing objects from the scene one by one and re-render. You might identify the culprit.
  • MelissaGTMelissaGT Posts: 2,611

    Do you have OptiX Prime Acceleration checked? I'm on Win 10 and that was the one thing that would push my system to always use the CPU no matter what I did. Unchecking it fixed my problem and now it renders properly on the GPU. 

  • Do you have OptiX Prime Acceleration checked? I'm on Win 10 and that was the one thing that would push my system to always use the CPU no matter what I did. Unchecking it fixed my problem and now it renders properly on the GPU. 

    I've heard about that, but mostly it happens with two and more gpu, but anyway I use one and Win7, and yes I checked it as well.

    But I kinda managed to make it work. So first of all I reduced resolution of all textures, second I removed all not important maps (backgrounds and interiors), and finally I set subdevision to low. So after pressing render button ram consumption riched 14,5Gb and gpu started!

    The problem was mostly in vehicles, too much hi-res textures, but not only. 

    But another question, why the hell it doesn't use pagefile for preporations and stuff? Vram waz used about 3gb. How can I make Daz using pagefile as part of the ram?

  • ebergerlyebergerly Posts: 3,255
    edited September 2018

    Something doesn't sound right. Again, the system RAM usage generally translates to 2-3 times the GPU VRAM usage. Now maybe you're using some crazy hi-res textures and stuff, but almost 15 GB usage for a 3 GB GPU seems crazy. Sounds like an issue I had long ago where I had a corrupted object in my scene, and when I removed it the problem went away.

    As far as pagefile, you don't want to use pagefile for GPU stuff since the access (latency) time to grab stuff from system RAM over the PCI is HUGE compared to accessing the same data from the internal GPU VRAM. There's also a thing called Unified Memory in CUDA where all your system RAM and GPU VRAM is treated like one big pool of memory, and in fact I think that's used to some extent to page unused data out to system RAM (for example when you open multiple instances of, say, Studio), but you don't want to go there because it's so slow. 

    By the way, for strictly system RAM stuff, yeah, it can use the pagefile if you have it configured to use the pagefile, and it's set correctly. Make sure you have it set correctly, and you can check the pagefile.sys on your hard drive to see if the size it generates is the same as your setting

    My suggestion: fix whatever is broke with that scene, cuz something's not right. Also keep in mind that another option for scenes that require a lot of VRAM is to break the scene into parts and composite them together to make your final image. That's what the pros do, and it not only helps with VRAM usage and render speed, but also gives you ultimate control over our final product, and give some much better and faster options for stuff like realtime motion blur and depth of field and on and on.   

    Post edited by ebergerly on
  • You're right, this is not how it must be. Keep searching for corrupted object, it looks like a problem.

  • Just tried another scene which 100% was ok. Same result, ram goes 16gb and gpu fails.

  • So I found what caused the problem, nothing new. It was Optix Acceleration, it surely makes rendering faster but sometimes it doesn't.
  • kenmokenmo Posts: 923

    I have an I7 4770 & 32 GBs of system DDR3 with a GTX 1060 6 GB video card.

    I was having a similar problem to you. IRAY would default to the CPU even when CPU was unchecked.

    Disabling Optix Acceleration fixed the issue. Weird...

Sign In or Register to comment.