I'm on 13.0-RELEASE-p2. Prior to looking at this thread, I had installed only drm-kmod and xf86-video-ati from packages. Everything I have is installed from packages, and I have nothing pertaining to my graphics modules in either /boot/loader.conf or /etc/rc.conf. This was enough to give me smooth running graphics and sufficient support to use the kde5 meta-package.
So out of curiosity about this thread, I installed clinfo and clpeak, also from packages, and I also got the "no platforms found" messages. Next I found this article, and followed its advice to install a bunch more packages, and then reboot:
https://beneschtech.medium.com/freebsd-and-opencl-c7055e717586
Now I get all this output from clinfo:
Code:
root@kde5:~ # clinfo
Number of platforms 1
Platform Name Portable Computing Language
Platform Vendor The pocl project
Platform Version OpenCL 1.2 pocl 1.6, Release+Asserts, LLVM 11.0.1, RELOC, SLEEF, DISTRO, POCL_DEBUG
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd
Platform Extensions function suffix POCL
Platform Name Portable Computing Language
Number of devices 1
Device Name AMD A6-6310 APU with AMD Radeon R4 Graphics
Device Vendor pocl
Device Vendor ID 0x6c636f70
Device Version OpenCL 1.2 pocl HSTR: pthread-x86_64-portbld-freebsd13.0-btver2
Driver Version 1.6
Device OpenCL C Version OpenCL C 1.2 pocl
Device Type CPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 4
Max clock frequency 1800MHz
Device Partition (core)
Max number of sub-devices 4
Supported partition types equally, by counts
Supported affinity domains (n/a)
Max work item dimensions 3
Max work item sizes 4096x4096x4096
Max work group size 4096
Preferred work group size multiple (kernel) 8
Preferred / native vector sizes
char 16 / 16
short 16 / 16
int 8 / 8
long 4 / 4
half 0 / 0 (n/a)
float 8 / 8
double 4 / 4 (cl_khr_fp64)
Half-precision Floating-point support (n/a)
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 No
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 5429256192 (5.056GiB)
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 2097152 (2MiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 134217728 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 8192x8192 pixels
Max 3D image size 2048x2048x2048 pixels
Max number of read image args 128
Max number of write image args 128
Local memory type Global
Local memory size 32768 (32KiB)
Max number of constant args 8
Max constant buffer size 32768 (32KiB)
Max size of kernel argument 1024
Queue properties
Out-of-order execution Yes
Profiling Yes
Prefer user sync for interop Yes
Profiling timer resolution 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels Yes
printf() buffer size 16777216 (16MiB)
Built-in kernels (n/a)
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_3d_image_writes cl_khr_fp64 cl_khr_int64_base_atomics cl_khr_int64_extended_atomics cl_khr_fp64
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Portable Computing Language
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [POCL]
clCreateContext(NULL, ...) [default] Success [POCL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Portable Computing Language
Device Name AMD A6-6310 APU with AMD Radeon R4 Graphics
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) Success (1)
Platform Name Portable Computing Language
Device Name AMD A6-6310 APU with AMD Radeon R4 Graphics
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) No devices found in platform
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 Portable Computing Language
Device Name AMD A6-6310 APU with AMD Radeon R4 Graphics
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.13
ICD loader Profile OpenCL 3.0
... and I got this from clpeak:
Code:
root@kde5:~ # clpeak
Platform: Portable Computing Language
Device: AMD A6-6310 APU with AMD Radeon R4 Graphics
Driver version : 1.6 (FreeBSD)
Compute units : 4
Clock frequency : 1800 MHz
48 warnings generated.
Global memory bandwidth (GBPS)
float : 4.55
float2 : 5.63
float4 : 3.44
float8 : 5.05
float16 : 6.32
Single-precision compute (GFLOPS)
float : 2.03
float2 : 0.19
float4 : 7.79
float8 : 13.55
float16 : 1.50
No half precision support! Skipped
Double-precision compute (GFLOPS)
double : 1.73
double2 : 3.13
double4 : 6.03
double8 : 0.80
double16 : 0.98
Integer compute (GIOPS)
int : 3.87
int2 : 5.77
int4 : 11.70
int8 : 18.14
int16 : 18.24
Transfer bandwidth (GBPS)
enqueueWriteBuffer : 2.32
enqueueReadBuffer : 2.40
enqueueMapBuffer(for read) : 21304.40
memcpy from mapped ptr : 2.49
enqueueUnmap(after write) : 17516.18
memcpy to mapped ptr : 2.50
Kernel launch latency : 16.06 us
The clinfo output was generated pretty rapidly, but it took several minutes of maxxed-out CPU activity to generate the clpeak report.
Otherwise, my system and kde5 DE seem to run much as they did before, but they maybe seem a bit more labored and busy now. This was enough to satisfy my curiosity, and, in time, I'll probably rip these changes out, or reinstall everything from scratch to the point where it was before.