2025-03-29

current64 - intel-opencl

 

intel-opencl

 

$ uname -a
Linux slitaz 5.10.221-slitaz64 #2 SMP Thu Jan 9 05:37:07 Europe 2025 x86_64 GNU/Linux

$ libreoffice --version
LibreOffice 24.8.4.2 bb3cfa12c7b1bf994ecc5649a80400d06cd71002

$ head -7 .config/libreoffice/4/cache/opencl_devices.log
Device Index: 0
Selected: true
Device Name: Intel(R) HD Graphics 610 [0x5902]
Device Vendor: Intel(R) Corporation
Device Version: OpenCL 3.0 NEO
Driver Version: 21.38.21026
Device Type: gpu

$ grep Selected .config/libreoffice/4/user/registrymodifications.xcu

<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SelectedOpenCLDeviceIdentifier" oor:op="fuse"><value>Intel(R) Corporation 21.38.21026--24.8.4.2--1738572466</value></prop></item>

$ tazpkg -s intel

Search result for "intel"
==========================================================
Installed packages
----------------------------------------------------------
intel-gmmlib        	21.2.1        	misc
intel-igc-core      	1.0.8708      	misc
intel-igc-opencl    	1.0.8708      	misc
intel-level-zero-gpu	1.2.21026     	misc
intel-ocloc         	21.38.21026   	misc
intel-opencl        	21.38.21026   	misc
libdrm-intel        	2.4.109       	x-window
mesa-dri-intel      	21.3.8        	x-window
xorg-xf86-video-intel   2.99.917      	x-window
==========================================================
9 installed packages found for "intel"


https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/37#post-53061

 

current64- amdgpu-libclc

 

current64- amdgpu-libclc

 

But on my hp with amdgpu, seem glitch again,

Try:
rm /usr/share/clc/gfx909-amdgcn-mesa-mesa3d.bc

or
remove the patch for libclc

# Patch to add AMD gfx9 and gfx10
patch -p1 < $stuff/libclc-add-missing-AMD-gfx9-and-gfx10-symlinks.patch

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/37#post-53060

current64 - mesamatrix

 

current64 - mesamatrix


> opencl-mesa not work correctly but with opencl-amdgpu-pro-icd it's work.

yes.

mesamatrix

This page is a graphical representation of the text file docs/features.txt from the Mesa repository.

Age Commit message
1 day tu: Implement VK_KHR_maintenance7
2 days panvk: fix dependency for EXT_display_control
2 days panvk: disable VK_KHR_shader_quad_control
....

Rusticl OpenCL

There are a total of 123 extensions to implement. The ranking is based on the current number of extensions implemented per driver.
# 	Driver 	Extensions 	Version
1 	iris 	(56.9%) 70 	1.0
2 	radeonsi (55.3%) 68 	1.0
2 	mesa 	(55.3%) 68 	N/A
4 	llvmpipe (54.5%) 67 	1.0
5 	zink 	(52.8%) 65 	1.0
6 	nvc0 	(49.6%) 61 	1.0
7 	panfrost (48.8%) 60 	1.0
7 	asahi 	(48.8%) 60 	1.0
9 	freedreno (48.0%) 59 	1.0

Clover OpenCL

There are a total of 123 extensions to implement. The ranking is based on the current number of extensions implemented per driver.
# 	Driver 	Extensions 	Version
1 	mesa 	(39.8%) 49 	N/A
2 	nvc0 	(36.6%) 45 	N/A
3 	r600 	(33.3%) 41 	N/A
3 	radeonsi (33.3%) 41 	N/A

https://mesamatrix.net/

 

 

 

 

 

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/37#post-53054

 

 

 

current64 - amdgpu-pro-opencl

 

amdgpu-pro-opencl

 

Device Index: 0
Selected: false
Device Name: AMD RENOIR (DRM 3.40.0, 5.10.221-slitaz64, LLVM 13.0.0)

Device Index: 0
Selected: false
Device Name: AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.4, DRM 3.59, 6.12.7)

amdgpu-pro

Package : opencl-amdgpu-pro-icd
Short desc : non-free AMD OpenCL ICD Loaders

$ ls -l /etc/OpenCL/vendors/
total 8
-rw-r--r-- 1 root root 15 Mar 10 13:14 amdocl64.icd
-rw-r--r-- 1 root root 19 Mar 3 09:23 mesa.icd

$ cat /etc/OpenCL/vendors/*icd
libamdocl64.so
libMesaOpenCL.so.1

$ tazpkg info opencl-amdgpu-pro-icd

TazPkg information
========================================================
Package : opencl-amdgpu-pro-icd
State : installed package
Version : 20.10-1048554
Category : misc
Short desc : non-free AMD OpenCL ICD Loaders
Maintainer : nobody@slitaz.org
Web site : Homepage:
Conf. files: /etc/OpenCL/vendors/amdocl64.icd
Size : 20.3M/89.2M
========================================================

$ tazpkg -lf opencl-amdgpu-pro-icd

Installed files by "opencl-amdgpu-pro-icd"
========================================================
/etc/OpenCL/vendors/amdocl64.icd
/opt/amdgpu-pro/lib/x86_64-linux-gnu/libamdocl64.so
/usr/share/doc/opencl-amdgpu-pro-icd/changelog.Debian.gz
/usr/share/doc/opencl-amdgpu-pro-icd/copyright
========================================================
4 files

$ zcat /usr/share/doc/opencl-amdgpu-pro-icd/changelog.Debian.gz
opencl-amdgpu (20.10-1048554) bionic; urgency=low

* Checkout from git up to commit
opencl
gerritgit/releases/amd-20.10
4ee9c84974fc3d167deaa2fe3f2da568141b7ba3
build ID: 1048554

-- AMD automated build system <gpudriverdevsupport@amd.com> Wed, 08 Apr 2020 23:50:08 -0400

$ grep -A5 'Device Index' .config/libreoffice/4/cache/opencl_devices.log

Device Index: 0
Selected: false
Device Name: AMD RENOIR (DRM 3.40.0, 5.10.221-slitaz64, LLVM 13.0.0)
Device Vendor: AMD
Device Version: OpenCL 1.1 Mesa 21.3.8
Driver Version: 21.3.8
--
Device Index: 1
Selected: true
Device Name: gfx902
Device Vendor: Advanced Micro Devices, Inc.
Device Version: OpenCL 2.0 AMD-APP (3075.10)
Driver Version: 3075.10 (PAL,HSAIL)

$ grep OpenCL .config/libreoffice/4/user/registrymodifications.xcu
<item oor:path="/org.openoffice.Office.Calc/Formula/Calculation"><prop oor:name="OpenCLMinimumDataSize" oor:op="fuse"><value>100</value></prop></item>
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SelectedOpenCLDeviceIdentifier" oor:op="fuse"><value>Advanced Micro Devices, Inc. 3075.10 (PAL,HSAIL)--24.8.4.2--1738572466</value></prop></item>

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/36#post-53052

current64 - slackware-opencl

 slackware-opencl

 

Unfortunately, if i try to enable openCL in LibreOffice, still graphic stack glitch

Can’t enable OpenCL,too.

live@darkstar:~$ uname -a
Linux darkstar.home.arpa 6.12.7 #1 SMP PREEMPT_DYNAMIC Fri Dec 27 13:47:18 CST 2024 x86_64 AMD Ryzen 7 5800H with Radeon Graphics AuthenticAMD GNU/Linux

live@darkstar:~$ libreoffice --version
LibreOffice 25.2.1.2 520(Build:2)

live@darkstar:~$ ls -l /etc/OpenCL/vendors/
total 1
-rw-r--r-- 1 root root 19 Nov 28 20:22 mesa.icd
-rw-r--r-- 1 root root 22 Nov 28 20:22 rusticl.icd

live@darkstar:~$ cat /etc/OpenCL/vendors/*.icd
libMesaOpenCL.so.1
libRusticlOpenCL.so.1

live@darkstar:~$ ls -l /usr/share/clc/gfx909*
lrwxrwxrwx 1 root root 18 Dec 28 12:53 /usr/share/clc/gfx909-amdgcn--.bc -> tahiti-amdgcn--.bc
lrwxrwxrwx 1 root root 28 Dec 28 12:53 /usr/share/clc/gfx909-amdgcn-mesa-mesa3d.bc -> tahiti-amdgcn-mesa-mesa3d.bc

live@darkstar:~$ clinfo -l
Platform #0: Clover
`-- Device #0: AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.4, DRM 3.59, 6.12.7)
Platform #1: rusticl

live@darkstar:~$ cat .config/libreoffice/4/cache/opencl_profile.xml
<?xml version="1.0" encoding="UTF-8"?>
<profile>
<version>LibreOffice v1</version>
<device>
<type>opencl</type>
<name>AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.4, DRM 3.59, 6.12.7)</name>
<driver>24.2.8</driver>
<time>62612026</time>
<errors>false</errors>
</device>
<device>
<type>native</type>
<time>106091520</time>
<errors>false</errors>
</device>
</profile>

live@darkstar:~$ cat .config/libreoffice/4/cache/opencl_devices.log
Device Index: 0
Selected: false
Device Name: AMD Radeon Graphics (radeonsi, renoir, LLVM 19.1.4, DRM 3.59, 6.12.7)
Device Vendor: AMD
Device Version: OpenCL 1.1 Mesa 24.2.8
Driver Version: 24.2.8
Device Type: gpu
Device Extensions: cl_khr_byte_addressable_store 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_extended_versioning
Device OpenCL C Version: OpenCL C 1.1
Device Available: true
Device Compiler Available: true
Device Linker Available: true
Platform Name: Clover
Platform Vendor: Mesa
Platform Version: OpenCL 1.1 Mesa 24.2.8
Platform Profile: FULL_PROFILE
Platform Extensions: cl_khr_icd 

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/36#post-53051 


2025-03-02

current64 - libclc-DCMAKE_INSTALL_DATADIR=lib

 

 libclc-DCMAKE_INSTALL_DATADIR=lib

> cannot open file '/usr//usr/lib/clc/gfx909-amdgcn-mesa-mesa3d.bc': No such file or directory

Infact clinfo not happy because, search gfx file un /usr//usr/lib instead /usr/lib :(

Not sure how that leads to the error path.

-DCMAKE_INSTALL_DATADIR=lib \

$ grep -A20 compile /var/lib/tazpkg/installed/libclc/receipt
compile_rules()
{

# Patch to add AMD gfx9 and gfx10
# See https://bugs.llvm.org/show_bug.cgi?id=44841
# and https://github.com/llvm/llvm-project/issues/52665
patch -p1 < $stuff/libclc-add-missing-AMD-gfx9-and-gfx10-symlinks.patch

mkdir build && cd build
CC=gcc CXX=g++ \
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_DATADIR=lib \
-Wno-dev \
..

make
make DESTDIR=$install install
}

$ tazpkg -lf libclc-dev | grep libclc.pc
/usr/lib/pkgconfig/libclc.pc

$ cat /usr/lib/pkgconfig/libclc.pc
includedir=/usr/include
libexecdir=/usr/lib/clc

Name: libclc
Description: Library requirements of the OpenCL C programming language
Version: 0.2.0
Cflags: -I${includedir}
Libs: -L${libexecdir}

VS.

slackware

live@darkstar:~$ clinfo | more
=== CL_PROGRAM_BUILD_LOG ===
fatal error: cannot open file '/usr/share/clc/
gfx909-amdgcn-mesa-mesa3d.bc': No such file or directory
Number of platforms 2
Platform Name Clover
Platform Vendor Mesa
Platform Version OpenCL 1.1 Mesa 22.3.1
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix MESA

Platform Name rusticl
Platform Vendor Mesa/X.org
Platform Version OpenCL 3.0
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions with Version cl_khr_icd 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix MESA
Platform Host timer resolution 0ns

Platform Name Clover
Number of devices 1
Device Name AMD Radeon Graphics (renoir, LLVM 14.0.6, DRM 3.42, 5.15.94)
--More--

live@darkstar:~$ grep OpenCL /var/log/packages/mesa-22.3.1-x86_64-1
etc/OpenCL/
etc/OpenCL/vendors/
etc/OpenCL/vendors/mesa.icd
etc/OpenCL/vendors/rusticl.icd
usr/lib64/libMesaOpenCL.so.1.0.0
usr/lib64/libRusticlOpenCL.so.1.0.0

live@darkstar:~$ grep libclc.pc /var/log/packages/libclc-13.0.0-x86_64-1
usr/share/pkgconfig/libclc.pc

live@darkstar:~$ cat /usr/share/pkgconfig/libclc.pc
includedir=/usr/include
libexecdir=/usr/share/clc

Name: libclc
Description: Library requirements of the OpenCL C programming language
Version: 0.2.0
Cflags: -I${includedir}
Libs: -L${libexecdir}

libclc.SlackBuild

# Configure, build, and install:
mkdir cmake-build
cd cmake-build
cmake \
-DCMAKE_C_FLAGS="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_SUFFIX="$LIBDIRSUFFIX" \
-DDOC_INSTALL_DIR="doc" \
-DMAN_INSTALL_DIR=/usr/man \
.. || exit 1
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1

https://slackware.nl/slackware/slackware64-15.0/source/l/libclc/libclc.SlackBuild

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/36#post-53021

 

current64 - opencl-libclc

[Libclc] add support for AMD Renoir (gfx909 ? )

miss file "/usr/lib/clc/gfx909-amdgcn-mesa-mesa3d.bc" :/
Seem in more recent libclc (llvm 17 or 19),

You're right.

[Libclc] Please add support for AMD Renoir (gfx909 ? )#52665
https://github.com/llvm/llvm-project/issues/52665

libclc: add missing AMD gfx symlinks #78884
https://github.com/llvm/llvm-project/pull/78884

Bug 44841 - Add support for GFX1010
https://bugs.llvm.org/show_bug.cgi?id=44841

 

https://forum.slitaz.org/topic/usage-of-slitaz-40-rolling/page/36#post-53013


current64 - libreoffice-opencl_profile-opencl_devices

libreoffice-opencl_profile-opencl_devices-registrymodifications.xcu

Choose Tools - Options - LibreOffice - OpenCL.

Can’t enable OpenCL, as after restarting LibreOffice, the checkbox is unchecked again and OpenCL is not used.

Can’t enable OpenCL.

$ clinfo -l
Platform #0: Clover
`-- Device #0: AMD RENOIR (DRM 3.40.0, 5.10.221-slitaz64, LLVM 13.0.0)

$ cat .config/libreoffice/4/cache/opencl_profile.xml
<?xml version="1.0" encoding="UTF-8"?>
<profile>
<version>LibreOffice v1</version>
<device>
<type>opencl</type>
<name>AMD RENOIR (DRM 3.40.0, 5.10.221-slitaz64, LLVM 13.0.0)</name>
<driver>21.3.8</driver>
<time>max</time>
<errors>true</errors>
</device>
<device>
<type>native</type>
<time>1678848</time>
<errors>false</errors>
</device>
</profile>

$ cat .config/libreoffice/4/cache/opencl_devices.log
Device Index: 0
Selected: false
Device Name: AMD RENOIR (DRM 3.40.0, 5.10.221-slitaz64, LLVM 13.0.0)
Device Vendor: AMD
Device Version: OpenCL 1.1 Mesa 21.3.8
Driver Version: 21.3.8
Device Type: gpu
Device Extensions: cl_khr_byte_addressable_store 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_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64 cl_khr_extended_versioning
Device OpenCL C Version: OpenCL C 1.1
Device Available: true
Device Compiler Available: true
Device Linker Available: true
Platform Name: Clover
Platform Vendor: Mesa
Platform Version: OpenCL 1.1 Mesa 21.3.8
Platform Profile: FULL_PROFILE
Platform Extensions: cl_khr_icd

$ grep OpenCL .config/libreoffice/4/user/registrymodifications.xcu
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="OpenCLAllowList" oor:op="fuse"><value><it>//Advanced Micro Devices, Inc\.//</it><it>//Intel\(R\) Corporation//</it><it>//NVIDIA Corporation//</it><it>Linux//Advanced Micro Devices, Inc\.//1445\.5 \(sse2,avx\)</it></value></prop></item>
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="OpenCLDenyList" oor:op="fuse"><value><it>Windows//Intel\(R\) Corporation//3\.0\.1\.10891</it><it>Windows//Intel\(R\) Corporation//4\.2\.0\.99</it><it>Windows//Intel\(R\) Corporation//5\.2\.0\.10049</it><it>Windows//Intel\(R\) Corporation//9\.17\.10\.2884</it></value></prop></item>
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="UseOpenCL" oor:op="fuse"><value>false</value></prop></item>