Cycles SVM Stack full with relatively few nodes #117706

Open
opened 2024-01-31 23:59:06 +01:00 by Zach Eastin · 9 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23

Blender Version
Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-31 09:40, hash: 58ceeee6f406
Worked: 4.0

Short description of error
I have an addon that effectively allows for layering and procedural editing of pbr texture sets to create new materials. This naturally can lead to many many nodes leading to an SVM Stack Space error. However, this is only in Blender 4.1 and wasn't present in 4.0. I have significantly parred down the nodes to a fairly reasonable amount and am still receiving the SVM error.

Exact steps for others to reproduce the error
Open attached blend file. Go into render mode in viewport. Cube will be black though if you mute (almost) any node you will see the bump result. Included a debugging node at the end to ensure that the value going into the bump node isn't just 0.

**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 551.23 **Blender Version** Broken: version: 4.1.0 Alpha, branch: main, commit date: 2024-01-31 09:40, hash: `58ceeee6f406` Worked: 4.0 **Short description of error** I have an addon that effectively allows for layering and procedural editing of pbr texture sets to create new materials. This naturally can lead to many many nodes leading to an SVM Stack Space error. However, this is only in Blender 4.1 and wasn't present in 4.0. I have significantly parred down the nodes to a fairly reasonable amount and am still receiving the SVM error. **Exact steps for others to reproduce the error** Open attached blend file. Go into render mode in viewport. Cube will be black though if you mute (almost) any node you will see the bump result. Included a debugging node at the end to ensure that the value going into the bump node isn't just 0.
Zach Eastin added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-31 23:59:07 +01:00
Iliya Katushenock added the
Interest
Render & Cycles
label 2024-02-01 01:23:50 +01:00

This looks like expected limitation, your node groups have too many things still.
As i can see, this related with Bump node, this might be mean that your shader is used multiple time to compute result value of normal.

There is one error: ERROR (bke.lib_id): C:\Users\blender\git\blender-vdev\blender.git\source\blender\blenkernel\intern\lib_id.cc:338 id_us_min: ID user decrement error: MATrue-Terrain Material (from '[Main]'): 0 <= 0, not sure how you did that, and not sure if this might cause any related issue, but just to note.

This looks like expected limitation, your node groups have too many things still. As i can see, this related with `Bump` node, this might be mean that your shader is used multiple time to compute result value of normal. There is one error: `ERROR (bke.lib_id): C:\Users\blender\git\blender-vdev\blender.git\source\blender\blenkernel\intern\lib_id.cc:338 id_us_min: ID user decrement error: MATrue-Terrain Material (from '[Main]'): 0 <= 0`, not sure how you did that, and not sure if this might cause any related issue, but just to note.
Member

Hi, thanks for the report. This is expected behavior. Svm stack can hold upto 256 nodes. Your node tree has many nodes, hence the error.
Though this won't happen if you render with CPU+OSL. @Alaska explained the situation in details at #115459, closing.

Hi, thanks for the report. This is expected behavior. Svm stack can hold upto 256 nodes. Your node tree has many nodes, hence the error. Though this won't happen if you render with CPU+OSL. @Alaska explained the situation in details at #115459, closing.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-02-01 04:35:49 +01:00
Author

Apologies for being maybe a bit of a pain but I think this is different than #115459 . Though, and maybe I just missed the explanation, if I'm hitting the max of 256 nodes shouldn't that limit be reached in both Blender 4.0 and Blender 4.1?

Also, how come in this new file I'm attaching if I don't use any boolean group inputs it seems to work?

Like I said before, I have an addon that has added, and Blender has been fine with, significantly more nodes than what is in these test blends and I mean like hundreds of nodes more. The original blend file had probably around a hundred or more nodes removed from it that weren't effecting the svm error to help you all out. This new blend file attached has more nodes than the original one but still works. I say all this in hopes to peak your interest in opening this back up.

Apologies for being maybe a bit of a pain but I think this is different than #115459 . Though, and maybe I just missed the explanation, if I'm hitting the max of 256 nodes shouldn't that limit be reached in both Blender 4.0 and Blender 4.1? Also, how come in this new file I'm attaching if I don't use any boolean group inputs it seems to work? Like I said before, I have an addon that has added, and Blender has been fine with, significantly more nodes than what is in these test blends and I mean like hundreds of nodes more. The original blend file had probably around a hundred or more nodes removed from it that weren't effecting the svm error to help you all out. This new blend file attached has more nodes than the original one but still works. I say all this in hopes to peak your interest in opening this back up.
Blender Bot added
Status
Needs Triage
and removed
Status
Archived
labels 2024-02-01 16:46:20 +01:00

@Alaska hi, might you know something about that?/

@Alaska hi, might you know something about that?/
Author

Okay, sorry, just to add some more info. Here's one more blend file. For the last blend file I duplicated a group node that used Boolean sockets and just deleted all boolean sockets from a copy of the group node(s). In this one, that node group (No Bool) is still there, along with the original node group (Uses Bool), but I then duplicated Uses Bool again but this time converted the boolean group sockets to floats (Uses Floats) and it also seems to work. Also, there is something interesting with what of the 3 group nodes are connected. If No Bool is connected along with Uses Bool, Uses Bool will not work. However, if Uses Floats and Uses Bool are the only ones connected, Uses Bool works fine.

Okay, sorry, just to add some more info. Here's one more blend file. For the last blend file I duplicated a group node that used Boolean sockets and just deleted all boolean sockets from a copy of the group node(s). In this one, that node group (`No Bool`) is still there, along with the original node group (`Uses Bool`), but I then duplicated `Uses Bool` again but this time converted the boolean group sockets to floats (`Uses Floats`) and it also seems to work. Also, there is something interesting with what of the 3 group nodes are connected. If `No Bool` is connected along with `Uses Bool`, `Uses Bool` will not work. However, if `Uses Floats` and `Uses Bool` are the only ones connected, `Uses Bool` works fine. <div id="image-table"> <table> <tr> <td style="padding:10px"> <img src="/attachments/582586c0-0a64-4971-97bb-253f59e69ce0" width="400"/> </td> <td style="padding:10px"> <img src="/attachments/4784db8f-226f-490a-afc7-04e733206d9d" width="400"/> </td> </tr> </table> </div>
Member

As Sergey shared in another report. The way the node graph is added to the SVM stack is non-deterministic. So a path that could be easily optimized out if the graph is computed one way may not work computed a different way. Along with that, versioning code in Blender 4.1 may change the node setup of files from Blender 4.0.

I don't think there's any versioning code for Blender 4.1 that should impact this file (but I may be wrong). And I don't know enough about the exact way the SVM Stack is constructed to know why connecting No Bool and Use Bools causes issues while other combinations doesn't. It's probably the "non-deterministic" behaviour that's causing that.

Anyway, it's probably better to get this looked at by someone else. See if it's a bug or just mark it as a known issue with "SVM has some issues, and this is one of them, we hope to improve it in the future."

As Sergey shared in another report. The way the node graph is added to the SVM stack is non-deterministic. So a path that could be easily optimized out if the graph is computed one way may not work computed a different way. Along with that, versioning code in Blender 4.1 may change the node setup of files from Blender 4.0. I don't think there's any versioning code for Blender 4.1 that should impact this file (but I may be wrong). And I don't know enough about the exact way the SVM Stack is constructed to know why connecting `No Bool` and `Use Bools` causes issues while other combinations doesn't. It's probably the "non-deterministic" behaviour that's causing that. Anyway, it's probably better to get this looked at by someone else. See if it's a bug or just mark it as a known issue with "SVM has some issues, and this is one of them, we hope to improve it in the future."
Member

Still looks expected since the nodetree has nested node groups with many nodes.
Given that 4.0 works, I did some checks, some commit between a935701a872d - 4050b0d6dfdb caused this.
@lichtwerk hi, can you help is bisecting?

Still looks expected since the nodetree has nested node groups with many nodes. Given that 4.0 works, I did some checks, some commit between `a935701a872d - 4050b0d6dfdb` caused this. @lichtwerk hi, can you help is bisecting?
Pratik Borhade added
Module
Render & Cycles
and removed
Interest
Render & Cycles
labels 2024-02-02 05:39:46 +01:00
Member

Raising priority for awareness.

Raising priority for awareness.
Pratik Borhade added
Priority
High
Status
Confirmed
and removed
Priority
Normal
Status
Needs Triage
labels 2024-02-07 07:36:47 +01:00
Author

Hopefully some helpful information. Removing the boolean and integer sockets from our shader groups seems to have removed the svm issue entirely and are easily able to add all node groups we wish to.

Hopefully some helpful information. Removing the boolean and integer sockets from our shader groups seems to have removed the svm issue entirely and are easily able to add all node groups we wish to.
Brecht Van Lommel added
Priority
Normal
and removed
Priority
High
labels 2024-02-28 17:18:02 +01:00
Sign in to join this conversation.
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
Interest: X11
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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#117706
No description provided.