Cycles hybrid rendering + OIDN not detecting correct number of threads #85779
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#85779
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-5.8.0-7642-generic-x86_64-with-glibc2.32 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.39
Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-18 19:59, hash:
27fd066bafShort description of error
When using cycles hybrid rendering (CPU+GPU) + Open Image Denoise, the number of rendering buckets should be equal to the number of threads in the CPU. This is n-1 for CPU and 1 thread reserved for the GPU (Confirmed by Lord @brecht)
Instead of using the number of available threads, only the number of available cores is used.
For example, in a 6 Core/12 Thread i7 + GPU configuration, we get 6 rendering buckets instead of 12 (11 CPU + 1 GPU).
Or, in a 4 Core/8 Thread i7 + GPU configuration, we get 4 rendering buckets instead of 8 (7 CPU + 1 GPU)
Disable OID and it goes back to normal.
Tested using CUDA on Linux and Windows
Added subscribers: @brecht, @zanqdo
Added subscriber: @Alaska
Changed status from 'Needs Triage' to: 'Needs User Info'
Just wanted to add that I was personally unable to replicate this issue with:
System Information:
Operating system: Linux-5.10.0-3-amd64-x86_64-with-glibc2.31 64 Bits
Graphics card: GeForce RTX 3070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 460.39
Central Processing Unit: Ryzen 9 5950X
Blender Version:
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-18 19:59, hash:
27fd066bafwith CUDA or OptiX.
@zanqdo, it's possible something may be wrong the build of Blender you have (or there may be an "issue" with the build of Blender I have), are you able to test with a Blender version downloaded from https://builder.blender.org/download/ if you haven't already?
It's also possible you may have some add-ons installed that are affecting this? Maybe try disabling all add-ons by loading factory defaults (Located in the menu
File -> Defaults -> Load Factory Defaults), then configuring your GPU+CPU setup in settings, then rendering and seeing if that fixes it?Another possible contributor could be the .blend file. Inspect the
Performancetab in theRender propertiespanel and make sure theThreads Modeis set toAuto.And I know this is a huge stretch, but it could be possible that you have hyperthreading disabled in the BIOS? It's also possible some other external application like "Thread Lasso" is affecting things, however that doesn't explain why it occurs on multiple OS.
I'm sorry, I'm just throwing ideas at the wall for why you may be experiencing this issue and seeing if any of them help.
The windows build is indeed downloaded from the builder.
Also Auto detection is set and it detects correctly: 12 in the Linux box and 8 in the Windows box.
When I switch to CPU mode, it will use all available threads.
I've also tested on factory defaults :)
Maybe it's an Intel only problem?
I really have no clue, and sadly I don't have an Intel CPU to test with. Will probably have to wait for others to report in on the issue.
In the meantime, are you able to run Blender with the debugger for Cycles? Here's how to do it on Linux:
"/path/to/blender" --debug-cyclesthen go to a scene and render with CPU+GPU.In here you can see messages saying
CPU render threads reduced from 32 to 31, to dedicate to GPU.Your Blender may be dedicating more threads to GPU than expected? Not sure.I'm sorry, I'm not a developer and I actually don't know enough about Blender to properly look into this, I'm just trying to gather information so when a developer does look into it, they can quickly rule out somethings.
It's also implied that you are building Blender from source code on your Linux machine. If so, it may be possible to bisect the exact commit that causes the issue for you.
But first, you should make sure that it is caused by a recent change in Blender. The easiest way is to download Blender 2.91.2 or 2.83.X and test with that. https://www.blender.org/download/
If those versions of Blender aren't working, then it's possibly something wrong with your system? Have a look into doing a clean OS install and such?
If those versions of Blender are working as expected, then you can go onto finding the commit that's causing the issue for you. This can be done by bisecting.
Simple instructions are given for bisecting in the triaging playbook :
For questions and assistance with that, check #blender-coders on blender.chat and point anyone to this reply.
Or I may be able to offer assistance.
Added subscriber: @ephraimpauli
Do they render with the Open image Denoise?
That's what I had the problem with. It was rendered with only half as many threads as possible. But with the CPU everything worked. Problem solution was the Denoise Node in the Compositor.
I can confirm what @ephraimpauli said, enabling
Open Image Denoisein the render settings limits threads to half that of the CPU when rendering with GPU compute or hybrid rendering.@zanqdo can you confirm this?
If this is the issue you're experiencing, then this seems to be expected? In this file (https://developer.blender.org/diffusion/B/browse/master/intern/cycles/blender/blender_sync.cpp$904) there is a comment that explains that Blender should
Add additional denoising devices if we are rendering and denoising with different devices.Which probably includes adding half the thread count to denoising when rendering with a different device (E.G. GPU compute, even if it includes CPU via hybrid rendering).OMG That was it! Is this intentional?
This totally kills the performance without the user having any clue of the cause.
Cycles hybrid rendering not detecting correct number of threadsto Cycles hybrid rendering + OID not detecting correct number of threadsCycles hybrid rendering + OID not detecting correct number of threadsto Cycles hybrid rendering + OIDN not detecting correct number of threadsAdded subscriber: @lichtwerk
Changed status from 'Needs User Info' to: 'Confirmed'
Also seeing this.
Not totally sure if this has an underlying reason, but if so, should be reflected in the UI somehow I guess.
Added subscriber: @DanielSilva-1
Getting the same problem. Tried forcing more threads manually but it didn't work. Same bevaviour using the number of cores and not the number of threads.
Added subscriber: @ChengduLittleA
With OpenImageDenoise on it's the same problem. The UI shows 8 threads but only 4 were used during render.
This issue was referenced by blender/cycles@94f375d56c
This issue was referenced by
abc3128011Changed status from 'Confirmed' to: 'Resolved'
To be clear, this is analysis is wrong, there's no logic in Cycles to dedicate half the threads to denoising.