GPU device selection

Whether it is possible to choose the specific GPU devices for rendering in Blender? At least two reasons for this:

  • to leave 1 GPU for viewport work
  • disable GPUs connected with PCIE(1x) and enable GPUs connected with PCIE(8x)/PCIE(16x) when working in viewport (Cycles Rendered). Enable all GPUs for rendering only.

If it is not possible at this moment then perhaps there is someone interested in write addon for Blender. I can pay for this and I think there are other people interested in participate and co-finance.

My proposal for interface:

There is some selection in the user preferences. Did you see that?

I will hate the person that has that man GPUs inside …

You can select all of your graphics cards or just one. In my post I described a reasons I need to select any configuration of graphic cards. The configuration in attached interface graphics is my real configuration. The GTX780 cards is connected to PCIEx1 and this terribly slowing my viewport work despite I have additional Radeon 280x just for viewport. I want enable GTX780Ti’s only when working on models/scenes and enable GTX780’s only when final rendering.

Preferences panel should look something like this:

I’m sorry… :slight_smile:

780/780Ti are quite chip now and as fast as 970/980 in Blender.

I found scripts on the forum:

to list devices:[‘compute_device’].enum_items.keys()

to enable device:
bpy.context.user_preferences.system.compute_device_type = “CUDA”
bpy.context.user_preferences.system.compute_device = ‘CUDA_0’

I have no idea how to enable a several specified devices. Anyone can help?

Here’s how my cuda script looks for running across all the GPUs in the system:

import bpy, _cycles
bpy.context.scene.cycles.device = ‘GPU’
bpy.context.user_preferences.system.compute_device_type = ‘CUDA’
bpy.context.user_preferences.system.compute_device = ‘CUDA_MULTI_0’