Prevent re-compiling of shaders for GPU

Prevent re-compiling of shaders for GPU

Anonymous
Not applicable
2,107 Views
9 Replies
Message 1 of 10

Prevent re-compiling of shaders for GPU

Anonymous
Not applicable

When rendering with an interactive session, arnold GPU compiles all the shaders for every IPR update. Is there a way to prevent this from happening? Tend's to create a delay between parameter updates and getting pixels to the screen.

0 Likes
2,108 Views
9 Replies
Replies (9)
Message 2 of 10

Christoph_Schaedl
Mentor
Mentor

I assume you have done the pre-populate?

https://docs.arnoldrenderer.com/display/A5AFMUG/Pre-populate+GPU+Cache

----------------------------------------------------------------
https://linktr.ee/cg_oglu
0 Likes
Message 3 of 10

Anonymous
Not applicable

Yes I have

0 Likes
Message 4 of 10

Anonymous
Not applicable

The issue is not with the optix cache, but with shader compilation

0 Likes
Message 5 of 10

Anonymous
Not applicable

Also to be clear, this is with the integration I have with Blender. It doesn't appear Maya or Houdini have this issue, so must be something done on my end that is not handling persistant shader pointers or something between interactive render updates.

0 Likes
Message 6 of 10

Stephen.Blair
Community Manager
Community Manager

The compiled shaders are stored in the GPU cache. Changing a parameter shouldn't force a re-compile.

Does the cache exist and is it being updated?

On Linux, the cache will be in a folder like
/var/tmp/OptixCache/tyler/arnold-5.3.1.0_driver-418.56



// Stephen Blair
// Arnold Renderer Support
0 Likes
Message 7 of 10

Anonymous
Not applicable

Here's the debug:

[gpu] setting OptiX disk cache location to: C:\Users\tyler\AppData\Local/NVIDIA/OptixCache/arnold-5.3.0.2_driver-419.67_devices-15891811226220818506
...
[gpu] building scene and compiling shaders ...
[gpu] building scene and compiling shaders done in 0:00.001
0 Likes
Message 8 of 10

Anonymous
Not applicable

That cache was created on 4/27/2019 - and I just tested this now, so it doesn't appear to be creating a new optix cache, however it's still trying to compile shaders for some weird reason.

It did however create this file in that directory `cache.db-shm`

0 Likes
Message 9 of 10

adrien.herubel
Autodesk
Autodesk

Hi Tyler,

According to your log the 'compiling shader' took less than a second ? This would mean that the actual compilation did not happen and that shaders were pulled from the cache. The rest of the time is spent in building the GPU scene, i,e acceleration structures.

0 Likes
Message 10 of 10

Anonymous
Not applicable

Ah, I see. It just seems like no pixels are updated when moving around this viewport during this call. There's a delay until I actually stop panning, before it updates. Is this normal behavior?

0 Likes