Lucas Eduardo
Posted on April 1, 2022
So far only AMD's OpenCL is officially supported but if you like to take some risks you can force enable OpenCL on Intel setting two environment variables:
- CYCLES_OPENCL_SPLIT_KERNEL_TEST=1: That's the one referenced in any post about it
- CYCLES_OPENCL_TEST=all: that variable is not so mentioned
A detail that you might forget is that you need to install the OpenCL drivers for your GPU before doing this. My 7th gen i5 still uses the legacy driver. The still maintained driver is for 8th gen and above. The driver link is broken but Wayback Machine covers this case fortunately.
Here is a full command for quick testing:
CYCLES_OPENCL_TEST=all CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 blender --python-expr "import bpy; [[print(d.type, d) for d in ds] for ds in bpy.context.preferences.addons['cycles'].preferences.get_devices()]" --verbose 69 -E CYCLES -b
And that's the output that appears on my machine:
Blender 2.93.5
Read prefs: /home/lucasew/.config/blender/2.93/config/userpref.blend
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
[ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
I0401 16:07:26.994379 438579 blender_python.cpp:195] Debug flags initialized to:
CPU flags:
AVX2 : True
AVX : True
SSE4.1 : True
SSE3 : True
SSE2 : True
BVH layout : EMBREE
Split : False
CUDA flags:
Adaptive Compile : False
OptiX flags:
CUDA streams : 1
OpenCL flags:
Device type : ALL
Debug : False
Memory limit : 0
I0401 16:07:28.091580 438579 device_cuda.cpp:56] CUEW initialization failed: Error opening the library
I0401 16:07:28.091853 438579 device_opencl.cpp:48] CLEW initialization succeeded.
I0401 16:07:28.093667 438579 opencl_util.cpp:957] Enumerating devices for platform Intel(R) OpenCL.
I0401 16:07:28.093719 438579 opencl_util.cpp:777] OpenCL driver version 1.2
I0401 16:07:28.093741 438579 opencl_util.cpp:993] Using more readable device name: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (OpenCL)
I0401 16:07:28.093761 438579 opencl_util.cpp:995] Adding new device Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz (OpenCL).
CPU <bpy_struct, CyclesDeviceSettings("Intel Core i5-7200U CPU @ 2.50GHz") at 0x7f812be0b608>
OPENCL <bpy_struct, CyclesDeviceSettings("Intel Core i5-7200U CPU @ 2.50GHz (OpenCL)") at 0x7f812be0b688>
CPU <bpy_struct, CyclesDeviceSettings("Intel Core i5-7200U CPU @ 2.50GHz") at 0x7f812be0b608>
Blender quit
With this a OpenCL GPU will appear on preferences.
But beware, in my case when I started rendering the CPU only got 100% but without slowdown the computer and Blender just stop reacting to any input so working is a too strong word.
Tested with Blender 2.93. Both nixpkgs and blender-bin 2.93 definitions works basically the same way.
Posted on April 1, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.