Unable to activate OpenCL

Hello,
I have been trying to get LibreOffice 6.2 to use OpenCL to accelerate processing large spreadsheets (over 3MB raw data). I am running Ubuntu Mate 18.04.3 with the 5.3.1 Mainline kernel.
clinfo output:


    Number of platforms                               1
  Platform Name                                   Intel Gen OCL Driver
  Platform Vendor                                 Intel
  Platform Version                                OpenCL 2.0 beignet 1.3
  Platform Profile                                FULL_PROFILE
  Platform Extensions                             cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_khr_gl_sharing
  Platform Extensions function suffix             Intel

  Platform Name                                   Intel Gen OCL Driver
Number of devices                                 1
  Device Name                                     Intel(R) HD Graphics 5500 BroadWell U-Processor GT2
  Device Vendor                                   Intel
  Device Vendor ID                                0x8086
  Device Version                                  OpenCL 1.2 beignet 1.3
  Driver Version                                  1.3
  Device OpenCL C Version                         OpenCL C 1.2 beignet 1.3
  Device Type                                     GPU
  Device Profile                                  FULL_PROFILE
  Device Available                                Yes
  Compiler Available                              Yes
  Linker Available                                Yes
  Max compute units                               24
  Max clock frequency                             1000MHz
  Device Partition                                (core)
    Max number of sub-devices                     1
    Supported partition types                     None, None, None
  Max work item dimensions                        3
  Max work item sizes                             512x512x512
  Max work group size                             512
  Preferred work group size multiple              16
  Preferred / native vector sizes                 
    char                                                16 / 8       
    short                                                8 / 8       
    int                                                  4 / 4       
    long                                                 2 / 2       
    half                                                 0 / 8        (cl_khr_fp16)
    float                                                4 / 4       
    double                                               0 / 2        (n/a)
  Half-precision Floating-point support           (cl_khr_fp16)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
  Single-precision Floating-point support         (core)
    Denormals                                     No
    Infinity and NANs                             Yes
    Round to nearest                              Yes
    Round to zero                                 No
    Round to infinity                             No
    IEEE754-2008 fused multiply-add               No
    Support is emulated in software               No
    Correctly-rounded divide and sqrt operations  No
  Double-precision Floating-point support         (n/a)
  Address bits                                    32, Little-Endian
  Global memory size                              4294967296 (4GiB)
  Error Correction support                        No
  Max memory allocation                           2147483648 (2GiB)
  Unified memory for Host and Device              Yes
  Minimum alignment for any data type             128 bytes
  Alignment of base address                       1024 bits (128 bytes)
  Global Memory cache type                        Read/Write
  Global Memory cache size                        8192 (8KiB)
  Global Memory cache line size                   64 bytes
  Image support                                   Yes
    Max number of samplers per kernel             16
    Max size for 1D images from buffer            65536 pixels
    Max 1D or 2D image array size                 2048 images
    Base address alignment for 2D image buffers   4096 bytes
    Pitch alignment for 2D image buffers          1 pixels
    Max 2D image size                             8192x8192 pixels
    Max 3D image size                             8192x8192x2048 pixels
    Max number of read image args                 128
    Max number of write image args                8
  Local memory type                               Local
  Local memory size                               65536 (64KiB)
  Max number of constant args                     8
  Max constant buffer size                        134217728 (128MiB)
  Max size of kernel argument                     1024
  Queue properties                                
    Out-of-order execution                        No
    Profiling                                     Yes
  Prefer user sync for interop                    Yes
  Profiling timer resolution                      80ns
  Execution capabilities                          
    Run OpenCL kernels                            Yes
    Run native kernels                            Yes
    SPIR versions                                 1.2
  printf() buffer size                            1048576 (1024KiB)
  Built-in kernels                                __cl_copy_region_align4;__cl_copy_region_align16;__cl_cpy_region_unalign_same_offset;__cl_copy_region_unalign_dst_offset;__cl_copy_region_unalign_src_offset;__cl_copy_buffer_rect;__cl_copy_image_1d_to_1d;__cl_copy_image_2d_to_2d;__cl_copy_image_3d_to_2d;__cl_copy_image_2d_to_3d;__cl_copy_image_3d_to_3d;__cl_copy_image_2d_to_buffer;__cl_copy_image_3d_to_buffer;__cl_copy_buffer_to_image_2d;__cl_copy_buffer_to_image_3d;__cl_fill_region_unalign;__cl_fill_region_align2;__cl_fill_region_align4;__cl_fill_region_align8_2;__cl_fill_region_align8_4;__cl_fill_region_align8_8;__cl_fill_region_align8_16;__cl_fill_region_align128;__cl_fill_image_1d;__cl_fill_image_1d_array;__cl_fill_image_2d;__cl_fill_image_2d_array;__cl_fill_image_3d;
  Device Extensions                               cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_khr_gl_sharing cl_khr_fp16

NULL platform behavior
  clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...)  Intel Gen OCL Driver
  clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...)   Success [Intel]
  clCreateContext(NULL, ...) [default]            Success [Intel]
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT)  Success (1)
    Platform Name                                 Intel Gen OCL Driver
    Device Name                                   Intel(R) HD Graphics 5500 BroadWell U-Processor GT2
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU)  Success (1)
    Platform Name                                 Intel Gen OCL Driver
    Device Name                                   Intel(R) HD Graphics 5500 BroadWell U-Processor GT2
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM)  No devices found in platform
  clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL)  Success (1)
    Platform Name                                 Intel Gen OCL Driver
    Device Name                                   Intel(R) HD Graphics 5500 BroadWell U-Processor GT2

ICD loader properties
  ICD loader Name                                 OpenCL ICD Loader
  ICD loader Vendor                               OCL Icd free software
  ICD loader Version                              2.2.11
  ICD loader Profile                              OpenCL 2.1

Everytime I try to Select the OpenCL option it asks me to restart LibO. When it does the option is disabled again.
How can I fix this issue?

1 Like

Unfortunately OpenCL implementations greatly vary between drivers and devices, and not all are suitable. Or rather, few are. In this case I guess it’s because it is not whitelisted. Or otherwise the driver doesn’t pass the tests LibreOffice carries out so it gets disabled. I’m wondering though that the Vendor is given just as Intel instead of Intel(R) Corporation (which then would match the whitelist).

You can try to add the device/driver details to your user profile’s registrymodifications.xcu (see https://wiki.documentfoundation.org/UserProfile#GNU.2FLinux for where it’s located) in OpenCLWhiteList and see if it works; note it may crash LibreOffice or even worse, calculate some things wrongly. Look for

<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="OpenCLWhiteList" oor:op="fuse">

(that should be present if you tried to enable OpenCL) and in the <value> list add an item

<it>Linux//Intel//OpenCL 2\.0 beignet 1\.3</it>

Note the // double slashes that delimit empty fields. I’m not entirely sure about the OpenCL 2\.0 beignet 1\.3 that should be the device driver version, it could also be just 1\.3 (note the string is a regular expression, hence the \. escaped dot).

I’m not responsible if this toasts your machine!

Please give feedback, if it works for you and calculates things correctly then we maybe could add the driver to the known whitelist.

The list item above didn’t work. I’m gonna try messing around with this a little.
Btw. So far I’ve only managed to toast a GPU due to attempting to control a motor using the DDC interface :wink:

Edit: I’ve just found this string in here:

Intel(R) HD Graphics 5500 BroadWell U-Processor GT2

Edit2: Nvm, I remember adding this myself. derp

Ok, So far I’ve tried 2.0 beignet 1.3, 1.3, 1.2 etc.
Is there a way to get a verbose log?

Only in a debug build you’d have to compile yourself, it could output the detected device info (might be worth changing that to also production build). However, if it fails with all version strings tried then possibly it fails during the runtime check, in which case nothing would help.

Hello @ΩElias :slight_smile: I suggest running clinfo command to get the present status of your OpenCL. If the result is 0 (zero). Then you need to install the appropriate OpenCL package(s) for your CPU.

Below is the same as above. But with details if you’re interested in those.

Steps

  1. Install this clinfo package Debian -- Package Search Results -- clinfo

  2. If not already done, install this sudo package Debian -- Package Search Results -- sudo

  3. Using Terminal, run this command get the present status of your OpenCL sudo clinfo

  4. If Terminal return this message Number of platforms 0 Then it is likely that OpenCL is not install, or not configure properly, or the wrong package was installed.

  5. If OpenCL is not install. You need to install the appropriate OpenCL package(s) for your CPU. For example, for Debian 10 Buster, with an Intel i7 CPU & NVIDIA graphics, install this package nvidia-opencl-icd at Debian -- Details of package nvidia-opencl-icd in buster

  6. Restart your device

  7. Using Terminal, run this command again to get the present status of your OpenCL sudo clinfo. If the result is not zero then you have successfully installed OpenCL for your device.

  8. Using LibreOffice, try to activate OpenCL again. Enjoy much faster calculations in LibreOffice.

Hi Francewhoa,
It is 2023 and I have installed version 7.4.5 on Manjaro using snap.
I have installed

opencl-headers
opencl-icd-loader
intel-compute-runtime

and rebooted the machine.

I cannot get

Allow use of OpenCL

to activate (be ticked after the application restart).

clinfo

reports

Number of platforms 1
Platform Name Intel(R) OpenCL HD Graphics
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 3.0
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info
Platform Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_device_uuid 0x400000 (1.0.0)
cl_khr_fp16 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_icd 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_intel_command_queue_families 0x400000 (1.0.0)
cl_intel_subgroups 0x400000 (1.0.0)
cl_intel_required_subgroup_size 0x400000 (1.0.0)
cl_intel_subgroups_short 0x400000 (1.0.0)
cl_khr_spir 0x400000 (1.0.0)
cl_intel_accelerator 0x400000 (1.0.0)
cl_intel_driver_diagnostics 0x400000 (1.0.0)
cl_khr_priority_hints 0x400000 (1.0.0)
cl_khr_throttle_hints 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_intel_subgroups_char 0x400000 (1.0.0)
cl_intel_subgroups_long 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_intel_mem_force_host_memory 0x400000 (1.0.0)
cl_khr_subgroup_extended_types 0x400000 (1.0.0)
cl_khr_subgroup_non_uniform_vote 0x400000 (1.0.0)
cl_khr_subgroup_ballot 0x400000 (1.0.0)
cl_khr_subgroup_non_uniform_arithmetic 0x400000 (1.0.0)
cl_khr_subgroup_shuffle 0x400000 (1.0.0)
cl_khr_subgroup_shuffle_relative 0x400000 (1.0.0)
cl_khr_subgroup_clustered_reduce 0x400000 (1.0.0)
cl_intel_device_attribute_query 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_intel_split_work_group_barrier 0x400000 (1.0.0)
cl_khr_fp64 0x400000 (1.0.0)
cl_khr_subgroups 0x400000 (1.0.0)
cl_intel_spirv_device_side_avc_motion_estimation 0x400000 (1.0.0)
cl_intel_spirv_media_block_io 0x400000 (1.0.0)
cl_intel_spirv_subgroups 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_intel_unified_shared_memory 0x400000 (1.0.0)
cl_khr_mipmap_image 0x400000 (1.0.0)
cl_khr_mipmap_image_writes 0x400000 (1.0.0)
cl_intel_planar_yuv 0x400000 (1.0.0)
cl_intel_packed_yuv 0x400000 (1.0.0)
cl_intel_motion_estimation 0x400000 (1.0.0)
cl_intel_device_side_avc_motion_estimation 0x400000 (1.0.0)
cl_intel_advanced_motion_estimation 0x400000 (1.0.0)
cl_khr_int64_base_atomics 0x400000 (1.0.0)
cl_khr_int64_extended_atomics 0x400000 (1.0.0)
cl_khr_image2d_from_buffer 0x400000 (1.0.0)
cl_khr_depth_images 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)
cl_intel_media_block_io 0x400000 (1.0.0)
cl_intel_va_api_media_sharing 0x400000 (1.0.0)
cl_intel_sharing_format_query 0x400000 (1.0.0)
cl_khr_pci_bus_info 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix INTEL
Platform Host timer resolution 1ns
Platform Name Intel(R) OpenCL HD Graphics
Number of devices 1
Device Name Intel(R) UHD Graphics 620 [0x5917]
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 3.0 NEO
Device UUID 86800000-1759-0000-0000-000000000000
Driver UUID 32322e34-332e-3330-0000-000000000000
Valid Device LUID No
Device LUID 2017-825bfe7f0000
Device Node Mask 0
Device Numeric Version 0xc00000 (3.0.0)
Driver Version 22.43.30
Device OpenCL C Version OpenCL C 1.2
Device OpenCL C all versions OpenCL C 0x400000 (1.0.0)
OpenCL C 0x401000 (1.1.0)
OpenCL C 0x402000 (1.2.0)
OpenCL C 0xc00000 (3.0.0)
Device OpenCL C features __opencl_c_int64 0xc00000 (3.0.0)
__opencl_c_3d_image_writes 0xc00000 (3.0.0)
__opencl_c_images 0xc00000 (3.0.0)
__opencl_c_read_write_images 0xc00000 (3.0.0)
__opencl_c_atomic_order_acq_rel 0xc00000 (3.0.0)
__opencl_c_atomic_order_seq_cst 0xc00000 (3.0.0)
__opencl_c_atomic_scope_all_devices 0xc00000 (3.0.0)
__opencl_c_atomic_scope_device 0xc00000 (3.0.0)
__opencl_c_generic_address_space 0xc00000 (3.0.0)
__opencl_c_program_scope_global_variables 0xc00000 (3.0.0)
__opencl_c_work_group_collective_functions 0xc00000 (3.0.0)
__opencl_c_subgroups 0xc00000 (3.0.0)
__opencl_c_pipes 0xc00000 (3.0.0)
__opencl_c_fp64 0xc00000 (3.0.0)
Latest comfornace test passed v2022-04-22-00
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 24
Max clock frequency 1100MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple (device) 32
Preferred work group size multiple (kernel) 32
Max sub-groups per work group 32
Sub-group sizes (Intel) 8, 16, 32
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 1 / 1
half 8 / 8 (cl_khr_fp16)
float 1 / 1
double 1 / 1 (cl_khr_fp64)
Half-precision Floating-point support (cl_khr_fp16)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations Yes
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 13319065600 (12.4GiB)
Error Correction support No
Max memory allocation 4294959104 (4GiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Preferred alignment for atomics
SVM 64 bytes
Global 64 bytes
Local 64 bytes
Atomic memory capabilities relaxed, acquire/release, sequentially-consistent, work-group scope, device scope, all-devices scope
Atomic fence capabilities relaxed, acquire/release, sequentially-consistent, work-item scope, work-group scope, device scope, all-devices scope
Max size for global variable 65536 (64KiB)
Preferred total size of global vars 4294959104 (4GiB)
Global Memory cache type Read/Write
Global Memory cache size 786432 (768KiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 268434944 pixels
Max 1D or 2D image array size 2048 images
Base address alignment for 2D image buffers 4 bytes
Pitch alignment for 2D image buffers 4 pixels
Max 2D image size 16384x16384 pixels
Max planar YUV image size 16384x16352 pixels
Max 3D image size 16384x16384x2048 pixels
Max number of read image args 128
Max number of write image args 128
Max number of read/write image args 128
Pipe support Yes
Max number of pipe args 16
Max active pipe reservations 1
Max pipe packet size 1024
Local memory type Local
Local memory size 65536 (64KiB)
Max number of constant args 8
Max constant buffer size 4294959104 (4GiB)
Generic address space support Yes
Max size of kernel argument 2048 (2KiB)
Queue properties (on host)
Out-of-order execution Yes
Profiling Yes
Device enqueue capabilities (n/a)
Queue properties (on device)
Out-of-order execution No
Profiling No
Preferred size 0
Max size 0
Max queues on device 0
Max events on device 0
Prefer user sync for interop Yes
Profiling timer resolution 83ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Non-uniform work-groups Yes
Work-group collective functions Yes
Sub-group independent forward progress Yes
IL version SPIR-V_1.2
ILs with version SPIR-V 0x402000 (1.2.0)
SPIR versions 1.2
printf() buffer size 4194304 (4MiB)
Built-in kernels block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intel;
Built-in kernels with version block_motion_estimate_intel 0x400000 (1.0.0)
block_advanced_motion_estimate_check_intel 0x400000 (1.0.0)
block_advanced_motion_estimate_bidirectional_check_intel 0x400000 (1.0.0)
Motion Estimation accelerator version (Intel) 2
Device-side AVC Motion Estimation version 1
Supports texture sampler use Yes
Supports preemption No
Device Extensions cl_khr_byte_addressable_store cl_khr_device_uuid cl_khr_fp16 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_command_queue_families cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_driver_diagnostics cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_intel_subgroups_char cl_intel_subgroups_long cl_khr_il_program cl_intel_mem_force_host_memory cl_khr_subgroup_extended_types cl_khr_subgroup_non_uniform_vote cl_khr_subgroup_ballot cl_khr_subgroup_non_uniform_arithmetic cl_khr_subgroup_shuffle cl_khr_subgroup_shuffle_relative cl_khr_subgroup_clustered_reduce cl_intel_device_attribute_query cl_khr_suggested_local_work_size cl_intel_split_work_group_barrier cl_khr_fp64 cl_khr_subgroups cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_spirv_no_integer_wrap_decoration cl_intel_unified_shared_memory cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_device_side_avc_motion_estimation cl_intel_advanced_motion_estimation cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_3d_image_writes cl_intel_media_block_io cl_intel_va_api_media_sharing cl_intel_sharing_format_query cl_khr_pci_bus_info
Device Extensions with Version cl_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_device_uuid 0x400000 (1.0.0)
cl_khr_fp16 0x400000 (1.0.0)
cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 0x400000 (1.0.0)
cl_khr_icd 0x400000 (1.0.0)
cl_khr_local_int32_base_atomics 0x400000 (1.0.0)
cl_khr_local_int32_extended_atomics 0x400000 (1.0.0)
cl_intel_command_queue_families 0x400000 (1.0.0)
cl_intel_subgroups 0x400000 (1.0.0)
cl_intel_required_subgroup_size 0x400000 (1.0.0)
cl_intel_subgroups_short 0x400000 (1.0.0)
cl_khr_spir 0x400000 (1.0.0)
cl_intel_accelerator 0x400000 (1.0.0)
cl_intel_driver_diagnostics 0x400000 (1.0.0)
cl_khr_priority_hints 0x400000 (1.0.0)
cl_khr_throttle_hints 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_intel_subgroups_char 0x400000 (1.0.0)
cl_intel_subgroups_long 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_intel_mem_force_host_memory 0x400000 (1.0.0)
cl_khr_subgroup_extended_types 0x400000 (1.0.0)
cl_khr_subgroup_non_uniform_vote 0x400000 (1.0.0)
cl_khr_subgroup_ballot 0x400000 (1.0.0)
cl_khr_subgroup_non_uniform_arithmetic 0x400000 (1.0.0)
cl_khr_subgroup_shuffle 0x400000 (1.0.0)
cl_khr_subgroup_shuffle_relative 0x400000 (1.0.0)
cl_khr_subgroup_clustered_reduce 0x400000 (1.0.0)
cl_intel_device_attribute_query 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_intel_split_work_group_barrier 0x400000 (1.0.0)
cl_khr_fp64 0x400000 (1.0.0)
cl_khr_subgroups 0x400000 (1.0.0)
cl_intel_spirv_device_side_avc_motion_estimation 0x400000 (1.0.0)
cl_intel_spirv_media_block_io 0x400000 (1.0.0)
cl_intel_spirv_subgroups 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_intel_unified_shared_memory 0x400000 (1.0.0)
cl_khr_mipmap_image 0x400000 (1.0.0)
cl_khr_mipmap_image_writes 0x400000 (1.0.0)
cl_intel_planar_yuv 0x400000 (1.0.0)
cl_intel_packed_yuv 0x400000 (1.0.0)
cl_intel_motion_estimation 0x400000 (1.0.0)
cl_intel_device_side_avc_motion_estimation 0x400000 (1.0.0)
cl_intel_advanced_motion_estimation 0x400000 (1.0.0)
cl_khr_int64_base_atomics 0x400000 (1.0.0)
cl_khr_int64_extended_atomics 0x400000 (1.0.0)
cl_khr_image2d_from_buffer 0x400000 (1.0.0)
cl_khr_depth_images 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)
cl_intel_media_block_io 0x400000 (1.0.0)
cl_intel_va_api_media_sharing 0x400000 (1.0.0)
cl_intel_sharing_format_query 0x400000 (1.0.0)
cl_khr_pci_bus_info 0x400000 (1.0.0)
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, …) Intel(R) OpenCL HD Graphics
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, …) Success [INTEL]
clCreateContext(NULL, …) [default] Success [INTEL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) UHD Graphics 620 [0x5917]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) UHD Graphics 620 [0x5917]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) UHD Graphics 620 [0x5917]
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.3.1
ICD loader Profile OpenCL 3.0

For more recent 2024 Linux, for faster calculation in LibreOffice I suggest considering those two options to choose from:

Option 1. Mesa Only.

Steps:

  1. If not already done, install the appropriate Mesa packages for your Linux

    • Most modern Linux already use Mesa by default. For example, on Debian 12 Bookworm, Mesa is both installed and activated by default. Easy.
    • For example, for Debian 12 Bookworm:
      1. If not already done, install those two packages clinfo and mesa-opencl-icd
      2. Execute this command clinfo, without sudo permission, to test that Mesa for OpenCL is installed. In the long result, search for the two lines Device Name and Device Version.
  2. Using LibreOffice, activate OpenCL

    • If somehow OpenCL can’t be quickly and easily activated on your Linux, I suggest the alternative 2nd option below.

Option 2. LibreOffice 24 + Threaded.

Steps:

  1. For potentially faster performance than OpenCL, simply leave OpenCL deactivated but install the latest LibreOffice version 24 or more recent using this official and safe repository at https://flathub.org/apps/org.libreoffice.LibreOffice

    • This repository above has very good and stable support for the automated “Threaded” mode. Which means that the more core your CPU has, the faster the calculations are. For example, with a 16 core CPU, calculations are automatically up to 16 time faster. So Threaded is potentially faster then OpenCL. On most modern Linux, with LibreOffice 24, Threaded is activated by default. Easy :slight_smile:
  2. To verify that your LibreOffice Calc is Threaded, using Calc, navigate to Help menu —> About LibreOffice option. This screenshot shows 8 CPU cores. So this Calc complete calculation up to 8 times faster. In other words, potentially faster then OpenCL.


Below is the same suggestion as above. But with details for those interested.


What is Mesa?

Starting in 2024, to activate OpenCL for LibreOffice version 24 or more recent, I suggest using the fully free and Libre Source (Open Source) Mesa created by https://www.mesa3d.org

Most modern Linux already use Mesa by default. And you do not need to install any additional driver. For example, on Debian 12 Bookworm, Mesa is both installed and activated by default. Easy. If somehow OpenCL can’t be quickly and easily activated on your Linux, I suggest the alternative 2nd option below.

For example, if you use Debian 12 Bookworm, install the appropriate package(s) below:

  • For Radeon GPU
    mesa-opencl-icd

  • For NVIDIA GPU
    nvidia-opencl-icd

  • For Intel GPU
    intel-opencl-icd

For those interested in stronger security and stronger privacy, I suggest considering alternative to Nvidia Graphics Drivers which both fully libre source (open source) and supported by Debian. Such as c. For Debian, the Mesa documentation is at https://wiki.debian.org/Mesa The 3 packages listed above are example of Mesa.

For those not familiar with non-Mesa Nvidia Graphics Drivers, they are partly secret source (closed source/proprietary) software, owned by a for profit corporation and not supported by Debian. In other words, the non-Mesa Nvidia Graphics Drivers have weaker security and weaker privacy.


What is Threaded?

If you’re not familiar with Threaded it means that all CPU cores will automatically be used for LibreOffice calculations. For example, if your CPU has 8 or 24 core, then with threaded automatically activated, the calculations will be up to 8 to 24 times faster :slight_smile: In comparison, some older version of LibreOffice did not support “Threaded”. In turn, only 1 CPU core was use for all calculation. In other words, the more CPU core you have, the faster the calculation are. This is all automated.

If you’re not familiar with using the Flathub repository to install the latest LibreOffice 24 or more recent, the documentation to install Flathub it is at https://flathub.org/setup After this one time setup, you get free and frequent updates. So your LibreOffice is always updated to the latest version available. Faster and faster :wink: With automatically activated Threaded for way faster calculation with large documents.