Page MenuHome

cuda disable openCL on windows
Closed, ResolvedPublic

Description

System Information
Win7 X64, vega 64 with 17.9.3, 1080TI with 385.69,

Blender Version
Broken: latest master

Short description of error
When cycles is compiled with cubins and an nvidia card is installed, OpenCL is not available in user pref anymore. If it's compiled without cubins, then the OpenCL option is available.

Exact steps for others to reproduce the error
On a PC with windows, and both an AMD and Nvidia card compatible with current cycles and a display connected to them:
compile Blender with "make.bat full", start it : OpenCL option is available.
compile Blender with "make.bat release": only CUDA is available.

Related Objects

Event Timeline

Brecht Van Lommel (brecht) triaged this task as Needs Information from User priority.

Can you attach the output of blender -b --debug-cycles -f 1 (to show the device initialization logs)?

full is made with "make.bat full" = no cubins
release is made with "make.bat release" = with cubins

For some reason the AMD GPU is not detected after CUDA devices are detected, I can see no code in Cycles itself that does this. I guess it's some internal thing in the graphics driver, where calling cuInit() somehow interferes with the AMD graphics driver?

Perhaps try reordering things in Device::available_devices() so OpenCL devices are initialized before CUDA devices?

indeed, it works now :) thanks for the solution, I think it's safe for master. Here are the diff we spoke of in IRC:
To allow OpenCL to be selected when CUDA is present:


to render all samples at once on OpenCL to limit update overhead, but botleneck is somewhere else when rendering small tiles:

And the patch you proposed to render with CUDA, OpenCL and CPU together, but only init phase works.

It seems the multi-device patch works when CPU is not selected. Note that in this case, selecting cpu in either the CUDA or OpenCL Tab of user pref activates it in the other one, so maybe it conflicts somehow?