cuda disable openCL on windows #53017

Closed
opened 2017-10-07 14:55:12 +02:00 by mathieu menuet · 11 comments

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.

**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.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli

Added subscriber: @brecht

Added subscriber: @brecht

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

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

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

release.log

full is made with "make.bat full" = no cubins release is made with "make.bat release" = with cubins [full.log](https://archive.blender.org/developer/F982330/full.log) [release.log](https://archive.blender.org/developer/F982331/release.log)

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?

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?
Author

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:
OpenCL_CUDA.diff
to render all samples at once on OpenCL to limit update overhead, but botleneck is somewhere else when rendering small tiles:
OpenCL_all_samples_once.diff
And the patch you proposed to render with CUDA, OpenCL and CPU together, but only init phase works.
OpenCL_mutli_device.diff

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: [OpenCL_CUDA.diff](https://archive.blender.org/developer/F984475/OpenCL_CUDA.diff) to render all samples at once on OpenCL to limit update overhead, but botleneck is somewhere else when rendering small tiles: [OpenCL_all_samples_once.diff](https://archive.blender.org/developer/F984477/OpenCL_all_samples_once.diff) And the patch you proposed to render with CUDA, OpenCL and CPU together, but only init phase works. [OpenCL_mutli_device.diff](https://archive.blender.org/developer/F984476/OpenCL_mutli_device.diff)

This issue was referenced by blender/cycles@eacde5d04a

This issue was referenced by blender/cycles@eacde5d04af23fcc2bc9b88695157b768b1a17ca

This issue was referenced by 5aa08eb3cc

This issue was referenced by 5aa08eb3cc7c9c5a6282d938fd2ffa6266a40ff7
Author

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?

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?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
3 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#53017
No description provided.