Alright, so i have a slightly strange system configuration. I'm running Zorin OS 12, which is roughly equivalent to Ubuntu 16.04. I am also running Mesa, but i use AMD's OpenCL. It works just fine with various miners i tested.
Now i want blender to actually render on the GPU. Blender detects it when i use the split kernel, but for some reason, whatever i do, it always falls back to the cpu.
Here's the script i use:
import bpy, _cycles bpy.ops.wm.open_mainfile(filepath="/home/xxx/xxx.blend") for scene in bpy.data.scenes: bpy.context.scene.render.engine = 'CYCLES' bpy.data.scenes["Scene"].cycles.device='GPU' bpy.context.scene.cycles.device = 'GPU' bpy.context.user_preferences.addons['cycles'].preferences.compute_device_type = "OPENCL" bpy.context.user_preferences.addons['cycles'].preferences.devices.use = True bpy.ops.render.render(True) img_path = "/home/xxx/Bilder/test_1.png" rendered_image = bpy.data.images["Render Result"] rendered_image.save_render(filepath=img_path)
I am really at a loss here, but i think this could work. I mean even if the GPU for some reason does not work, it should not just fall back to the CPU, but give me some sort of error, right?
Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.1 AMD-APP (2527.3) Platform Profile FULL_PROFILE Platform Extensions cl_khr_icd cl_amd_event_callback cl_amd_offline_devices Platform Host timer resolution <printPlatformInfo:5: get CL_PLATFORM_HOST_TIMER_RESOLUTION : error -30> Platform Extensions function suffix AMD
For reasons unknown to me, installing Radeon RenderPro for Blender has fixed the problem!