Cycles Optix internal compiler error #73533

Closed
opened 2020-02-01 14:22:29 +01:00 by AiSatan · 27 comments

System Information
Operating system: Windows 10
Graphics card: RTX 2070
Blender version: v2.81a (steam latest)

Everything was fine, but one day I start getting this exception each time I render(I'm always using optiX):

OptiX error OPTIX_ERROR_INTERNAL_COMPILER_ERROR in optixModuleCreateFromPTX(context, &module_options, &pipeline_options, ptx_data.data(), ptx_data.size(), nullptr, 0, &optix_module), line 394

only optix+Cycle render not work
this happens with any scenes

**System Information** Operating system: Windows 10 Graphics card: RTX 2070 Blender version: v2.81a (steam latest) Everything was fine, but one day I start getting this exception each time I render(I'm always using optiX): > OptiX error OPTIX_ERROR_INTERNAL_COMPILER_ERROR in optixModuleCreateFromPTX(context, &module_options, &pipeline_options, ptx_data.data(), ptx_data.size(), nullptr, 0, &optix_module), line 394 > only optix+Cycle render not work this happens with any scenes
Author

Added subscriber: @aisatan.ne

Added subscriber: @aisatan.ne
Brecht Van Lommel changed title from OPTIX INTERNAL COMPILER ERROR to Cycles Optix internal compiler error 2020-02-01 14:49:09 +01:00

Added subscriber: @pmoursnv

Added subscriber: @pmoursnv

Added subscriber: @brecht

Added subscriber: @brecht

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux).

Deleting the cache file from the %LOCALAPPDATA%\NVIDIA\OptixCache folder might help, in case it got corrupted.

This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux). Deleting the cache file from the `%LOCALAPPDATA%\NVIDIA\OptixCache` folder might help, in case it got corrupted.
Author

In #73533#863376, @brecht wrote:
This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux).

Deleting the cache file from the %LOCALAPPDATA%\NVIDIA\OptixCache folder might help, in case it got corrupted.

Thanks, but it didn't help, the exception left the same and some of the cache files re-created

> In #73533#863376, @brecht wrote: > This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux). > > Deleting the cache file from the `%LOCALAPPDATA%\NVIDIA\OptixCache` folder might help, in case it got corrupted. Thanks, but it didn't help, the exception left the same and some of the cache files re-created

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

Can you try the latest daily build then, in case it's already solved? https://builder.blender.org/download/

Or try upgrading the NVIDIA drivers to the latest version?

Can you try the latest daily build then, in case it's already solved? https://builder.blender.org/download/ Or try upgrading the NVIDIA drivers to the latest version?
Member

And if that does not help, please run Blender with --debug-cycles command-line argument and report back the console output after reproducing the problem (which contains more detailed information about the OptiX error).

And if that does not help, please run Blender with `--debug-cycles` command-line argument and report back the console output after reproducing the problem (which contains more detailed information about the OptiX error).

In #73533#864194, @pmoursnv wrote:
And if that does not help, please run Blender with --debug-cycles command-line argument and report back the console output after reproducing the problem (which contains more detailed information about the OptiX error).

This can be done by running blender_debug_log.cmd that is included with the Blender installation. After Blender exits it will show you log files, which can be attached to this report.

> In #73533#864194, @pmoursnv wrote: > And if that does not help, please run Blender with `--debug-cycles` command-line argument and report back the console output after reproducing the problem (which contains more detailed information about the OptiX error). This can be done by running `blender_debug_log.cmd` that is included with the Blender installation. After Blender exits it will show you log files, which can be attached to this report.
Author

I have the latest (game ready version) for today, 450.12

Yes, alpha v2.83.2 works fine for me, but not the beta.
I guess I will wait?

files from blender_debug_log.cmd:
debug_logs.zip

and console output with --debug-cycles:

Read prefs: C:\Users\aisat\AppData\Roaming\Blender Foundation\Blender\2.81\config\userpref.blend
AL lib: (EE) UpdateDeviceParams: Failed to set 48000hz, got 44100hz instead
found bundled python: E:\Steam\steamapps\common\Blender\2.81\python
I0203 20:18:59.541157  8040 blender_python.cpp:184] Debug flags initialized to:
CPU flags:
  AVX2       : True
  AVX        : True
  SSE4.1     : True
  SSE3       : True
  SSE2       : True
  BVH layout : BVH8
  Split      : False
CUDA flags:
  Adaptive Compile : False
OptiX flags:
  CUDA streams : 1
OpenCL flags:
  Device type    : ALL
  Debug          : False
  Memory limit   : 0
register_class(...):
Warning: 'DNOISEPanel' doesn't contain '_PT_' with prefix & suffix
I0203 20:18:59.681782  8040 device_cuda.cpp:2576] CUEW initialization succeeded
I0203 20:18:59.682780  8040 device_cuda.cpp:2578] Found precompiled kernels
I0203 20:18:59.699733  8040 device_cuda.cpp:2702] Device has compute preemption or is not used for display.
I0203 20:18:59.699733  8040 device_cuda.cpp:2705] Added device "GeForce RTX 2070" with id "CUDA_GeForce RTX 2070_0000:01:00".
I0203 20:19:05.800570 15104 util_task.cpp:329] Creating pool of 8 threads.
I0203 20:19:05.800570 15104 util_task.cpp:241] Detected 8 processors in active group.
I0203 20:19:05.800570 15104 util_task.cpp:251] Not setting thread group affinity.
I0203 20:19:05.869386 15104 device_optix.cpp:245] All knobs on default.
I0203 20:19:05.883349 15104 device_optix.cpp:245] Opened database: "C:\Users\aisat\AppData\Local\NVIDIA\OptixCache\cache7.db"
I0203 20:19:05.883349 15104 device_optix.cpp:245]     Cache data size: "117.1 MiB"
I0203 20:19:05.884347 15104 device_optix.cpp:1282] Buffer allocate: __params, 1,888 bytes. (1.84K) in device memory
I0203 20:19:05.885344  4644 session.cpp:753] Requested features:
Experimental features: Off
Max nodes group: 0
Nodes features: 0
Use Hair: False
Use Object Motion: False
Use Camera Motion: False
Use Baking: False
Use Subsurface: False
Use Volume: False
Use Branched Integrator: False
Use Patch Evaluation: False
Use Transparent Shadows: False
Use Principled BSDF: True
Use Denoising: False
Use Displacement: False
Use Background Light: True
I0203 20:19:05.890331  4644 device_optix.cpp:245] Cache miss for key: ptx-7491861-key5d53f3cb67b20ed3cb25f8f357d06dc2-sm_75-rtc1-drv450.12
E0203 20:19:45.260530  4644 device_optix.cpp:239] COMPILE ERROR: Module compilation failed
Info: Pipeline parameter "__params" size is 1888 bytes
Info: Module uses 6 payload values. Pipeline configuration: 6.
Info: Module uses 2 attribute values. Pipeline configuration: 2 (default).
Info: Entry function "__raygen__kernel_optix_path_trace" with semantic type RAYGEN has 9 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 12181 basic block(s), 126765 instruction(s)
Info: Entry function "__raygen__kernel_optix_displace" with semantic type RAYGEN has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 34 basic block(s), 1059 instruction(s)
Info: Entry function "__raygen__kernel_optix_background" with semantic type RAYGEN has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 8 basic block(s), 178 instruction(s)
Info: Entry function "__miss__kernel_optix_miss" with semantic type MISS has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 2 basic block(s), 6 instruction(s)
Info: Entry function "__anyhit__kernel_optix_local_hit" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 24 basic block(s), 217 instruction(s)
Info: Entry function "__anyhit__kernel_optix_shadow_all_hit" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 16 basic block(s), 137 instruction(s)
Info: Entry function "__anyhit__kernel_optix_visibility_test" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 6 basic block(s), 23 instruction(s)
Info: Entry function "__closesthit__kernel_optix_hit" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 7 basic block(s), 50 instruction(s)
Info: Entry function "__intersection__curve" with semantic type INTERSECTION has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 126 basic block(s), 1677 instruction(s)
Info: 20 non-entry function(s) have 6017 basic block(s), 97439 instruction(s)
OptiX error OPTIX_ERROR_INTERNAL_COMPILER_ERROR in optixModuleCreateFromPTX(context, &module_options, &pipeline_options, ptx_data.data(), ptx_data.size(), nullptr, 0, &optix_module), line 394
I0203 20:19:45.264519  4644 svm.cpp:79] Total 5 shaders.
I0203 20:19:45.264519 15104 blender_session.cpp:586] Total render time: 39.4648
I0203 20:19:45.265517 15104 blender_session.cpp:587] Render time (without synchronization): 0.0002459
I0203 20:19:45.275996 15104 device_optix.cpp:245] Closed database: "C:\Users\aisat\AppData\Local\NVIDIA\OptixCache\cache7.db"
I0203 20:19:45.275996 15104 device_optix.cpp:245]     Cache data size: "117.1 MiB"
I0203 20:19:45.315397 15104 util_task.cpp:347] De-initializing thread pool of task scheduler.

I have the latest (game ready version) for today, 450.12 Yes, alpha v2.83.2 works fine for me, but not the beta. I guess I will wait? files from blender_debug_log.cmd: [debug_logs.zip](https://archive.blender.org/developer/F8319320/debug_logs.zip) and console output with --debug-cycles: ``` Read prefs: C:\Users\aisat\AppData\Roaming\Blender Foundation\Blender\2.81\config\userpref.blend AL lib: (EE) UpdateDeviceParams: Failed to set 48000hz, got 44100hz instead found bundled python: E:\Steam\steamapps\common\Blender\2.81\python I0203 20:18:59.541157 8040 blender_python.cpp:184] Debug flags initialized to: CPU flags: AVX2 : True AVX : True SSE4.1 : True SSE3 : True SSE2 : True BVH layout : BVH8 Split : False CUDA flags: Adaptive Compile : False OptiX flags: CUDA streams : 1 OpenCL flags: Device type : ALL Debug : False Memory limit : 0 register_class(...): Warning: 'DNOISEPanel' doesn't contain '_PT_' with prefix & suffix I0203 20:18:59.681782 8040 device_cuda.cpp:2576] CUEW initialization succeeded I0203 20:18:59.682780 8040 device_cuda.cpp:2578] Found precompiled kernels I0203 20:18:59.699733 8040 device_cuda.cpp:2702] Device has compute preemption or is not used for display. I0203 20:18:59.699733 8040 device_cuda.cpp:2705] Added device "GeForce RTX 2070" with id "CUDA_GeForce RTX 2070_0000:01:00". I0203 20:19:05.800570 15104 util_task.cpp:329] Creating pool of 8 threads. I0203 20:19:05.800570 15104 util_task.cpp:241] Detected 8 processors in active group. I0203 20:19:05.800570 15104 util_task.cpp:251] Not setting thread group affinity. I0203 20:19:05.869386 15104 device_optix.cpp:245] All knobs on default. I0203 20:19:05.883349 15104 device_optix.cpp:245] Opened database: "C:\Users\aisat\AppData\Local\NVIDIA\OptixCache\cache7.db" I0203 20:19:05.883349 15104 device_optix.cpp:245] Cache data size: "117.1 MiB" I0203 20:19:05.884347 15104 device_optix.cpp:1282] Buffer allocate: __params, 1,888 bytes. (1.84K) in device memory I0203 20:19:05.885344 4644 session.cpp:753] Requested features: Experimental features: Off Max nodes group: 0 Nodes features: 0 Use Hair: False Use Object Motion: False Use Camera Motion: False Use Baking: False Use Subsurface: False Use Volume: False Use Branched Integrator: False Use Patch Evaluation: False Use Transparent Shadows: False Use Principled BSDF: True Use Denoising: False Use Displacement: False Use Background Light: True I0203 20:19:05.890331 4644 device_optix.cpp:245] Cache miss for key: ptx-7491861-key5d53f3cb67b20ed3cb25f8f357d06dc2-sm_75-rtc1-drv450.12 E0203 20:19:45.260530 4644 device_optix.cpp:239] COMPILE ERROR: Module compilation failed Info: Pipeline parameter "__params" size is 1888 bytes Info: Module uses 6 payload values. Pipeline configuration: 6. Info: Module uses 2 attribute values. Pipeline configuration: 2 (default). Info: Entry function "__raygen__kernel_optix_path_trace" with semantic type RAYGEN has 9 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 12181 basic block(s), 126765 instruction(s) Info: Entry function "__raygen__kernel_optix_displace" with semantic type RAYGEN has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 34 basic block(s), 1059 instruction(s) Info: Entry function "__raygen__kernel_optix_background" with semantic type RAYGEN has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 8 basic block(s), 178 instruction(s) Info: Entry function "__miss__kernel_optix_miss" with semantic type MISS has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 2 basic block(s), 6 instruction(s) Info: Entry function "__anyhit__kernel_optix_local_hit" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 24 basic block(s), 217 instruction(s) Info: Entry function "__anyhit__kernel_optix_shadow_all_hit" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 16 basic block(s), 137 instruction(s) Info: Entry function "__anyhit__kernel_optix_visibility_test" with semantic type ANYHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 6 basic block(s), 23 instruction(s) Info: Entry function "__closesthit__kernel_optix_hit" with semantic type CLOSESTHIT has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 7 basic block(s), 50 instruction(s) Info: Entry function "__intersection__curve" with semantic type INTERSECTION has 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 126 basic block(s), 1677 instruction(s) Info: 20 non-entry function(s) have 6017 basic block(s), 97439 instruction(s) OptiX error OPTIX_ERROR_INTERNAL_COMPILER_ERROR in optixModuleCreateFromPTX(context, &module_options, &pipeline_options, ptx_data.data(), ptx_data.size(), nullptr, 0, &optix_module), line 394 I0203 20:19:45.264519 4644 svm.cpp:79] Total 5 shaders. I0203 20:19:45.264519 15104 blender_session.cpp:586] Total render time: 39.4648 I0203 20:19:45.265517 15104 blender_session.cpp:587] Render time (without synchronization): 0.0002459 I0203 20:19:45.275996 15104 device_optix.cpp:245] Closed database: "C:\Users\aisat\AppData\Local\NVIDIA\OptixCache\cache7.db" I0203 20:19:45.275996 15104 device_optix.cpp:245] Cache data size: "117.1 MiB" I0203 20:19:45.315397 15104 util_task.cpp:347] De-initializing thread pool of task scheduler. ```

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'

Changed status from 'Needs User Info' to: 'Needs Developer To Reproduce'
Member

The latest official (and supported) driver on Windows is 442.19. May I ask where you got a 450.12 one?

The latest official (and supported) driver on Windows is 442.19. May I ask where you got a 450.12 one?
Author

Good point, I get updates from GeForce Experience (Game Ready version), but I'm also Windows Insider, I guess they gave me a test build of drivers too (maybe through windows update)

I will try to reinstall the official one from nvidia page.

Good point, I get updates from GeForce Experience (Game Ready version), but I'm also Windows Insider, I guess they gave me a test build of drivers too (maybe through windows update) I will try to reinstall the official one from nvidia page.
Author

Hi, I installed 442.19 and it did help, so we can close this I guess, thank you Patrick Mours

Hi, I installed 442.19 and it did help, so we can close this I guess, thank you Patrick Mours
Member

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'
Patrick Mours self-assigned this 2020-02-13 19:06:12 +01:00

Added subscriber: @ceecko

Added subscriber: @ceecko

Changed status from 'Archived' to: 'Resolved'

Changed status from 'Archived' to: 'Resolved'

I still experience the same issue.
Running with 2x NVIDIA #4 on Debian 9 with NVIDIA drivers 440.64.00 and Blender 2.83-9607e5498583-linux64

Blender is stuck on this line for about 60 seconds

Cache miss for key: ptx-xxx

During this time 1 cpu thread is 100% utilized.
After 60 seconds the rendering continues as usual.

Running rendering again after it is finished does not make Blender stuck on Cache miss and rather starts rendering straightaway without any delay.

I can easily replicate this if you need more debugging information.

I still experience the same issue. Running with 2x NVIDIA `#4` on Debian 9 with NVIDIA drivers `440.64.00` and Blender `2.83-9607e5498583-linux64` Blender is stuck on this line for about 60 seconds ``` Cache miss for key: ptx-xxx ``` During this time 1 cpu thread is 100% utilized. After 60 seconds the rendering continues as usual. Running rendering again after it is finished does not make Blender stuck on `Cache miss` and rather starts rendering straightaway without any delay. I can easily replicate this if you need more debugging information.

Changed status from 'Resolved' to: 'Archived'

Changed status from 'Resolved' to: 'Archived'

Sorry, the status changed on its own...

Sorry, the status changed on its own...

@ceecko, that sounds like it's compiling the PTX for the first time, and then reusing the cached item the next time. That's what I would expect to happen.

@ceecko, that sounds like it's compiling the PTX for the first time, and then reusing the cached item the next time. That's what I would expect to happen.

Sounds reasonable. I don't have experience with the compiling of cache. Maybe a stupid question:

Do you feel it's reasonable to expect compiling times of ~40sec for 117MiB cache as in the logs AiSatan provided?
Could it be maybe an issue of throughput?

Sounds reasonable. I don't have experience with the compiling of cache. Maybe a stupid question: Do you feel it's reasonable to expect compiling times of `~40sec` for `117MiB` cache as in the logs AiSatan provided? Could it be maybe an issue of throughput?

We'd like it to be faster, but that's the expected time now.

We'd like it to be faster, but that's the expected time now.

Added subscriber: @CosmoMidias

Added subscriber: @CosmoMidias

In #73533#863376, @brecht wrote:
This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux).

Deleting the cache file from the %LOCALAPPDATA%\NVIDIA\OptixCache folder might help, in case it got corrupted.

Thanks brecht! That worked for me!
{meme, src=itsawesome}

(running POP OS, Linux. RTX 2070 with the 440.44 nvidia driver)
The location in Linux is /var/tmp/OpitxCache

I spent all day trying to fix it and I was about to fresh install the OS... you saved my day! Or at leat the rest of it...

> In #73533#863376, @brecht wrote: > This issue may be similar to #73076 (Optix render kernels constantly reloading on Linux). > > Deleting the cache file from the `%LOCALAPPDATA%\NVIDIA\OptixCache` folder might help, in case it got corrupted. Thanks brecht! That worked for me! {meme, src=itsawesome} (running POP OS, Linux. RTX 2070 with the 440.44 nvidia driver) The location in Linux is /var/tmp/OpitxCache I spent all day trying to fix it and I was about to fresh install the OS... you saved my day! Or at leat the rest of it...
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
6 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#73533
No description provided.