Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clvk with goproMax-ffmpeg-v5 on Raspberry Pi 4 #459

Open
rowland-cook opened this issue Nov 14, 2022 · 0 comments
Open

clvk with goproMax-ffmpeg-v5 on Raspberry Pi 4 #459

rowland-cook opened this issue Nov 14, 2022 · 0 comments

Comments

@rowland-cook
Copy link

Hello,

I'm trying to compile and run a version of FFmpeg that is compatible with GoPro Max 360 video. This version of FFmpeg is dependent on OpenCL.
The FFmpeg repository can be found here:
https://github.com/gmat/goproMax-ffmpeg-v5.git

I have built clvk on an 8GB headless pi and the clinfo can be seen below.
FFmpeg reports 2 OpenCL devices, but aborts if more than 1.
[AVHWDeviceContext @ 0x55b41e6d60] 0.0: clvk / V3D 4.2
[AVHWDeviceContext @ 0x55b41e6d60] 0.1: clvk / llvmpipe (LLVM 11.0.1, 128 bits)

It was easy enough to amend the code to only use one of the devices. but I get the same problem on either.
"checking platform extension id -1896980064, name cl_intel_va_api_media_sharing"

Which device should I use V3D 4.2 or llvmpipe (LLVM 11.0.1, 128 bits)?

In both cases clvk is looking for cl_intel_va_api_media_sharing which cannot be correct for an arm system.
Sorry if I've missed it, but how do I change cl_intel_va_api_media_sharing and what should I change it to for a Raspberry Pi?

I then later get the error:
Failed to build program: -11.
OpenCL Kernel gopromax_equirectangular loaded err=-5
Error while filtering: Input/output error
Failed to inject frame into filter network: Input/output error

Any help would be appreciated.
Many thanks

clinfo
WARNING: lavapipe is not a conformant vulkan implementation, testing use only.
Number of platforms 1
Platform Name clvk
Platform Vendor clvk
Platform Version OpenCL 3.0 clvk
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_khr_extended_versioning
Platform Extensions with Version cl_khr_icd 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
Platform Numeric Version 0xc00000 (3.0.0)
Platform Extensions function suffix clvk
Platform Host timer resolution 0ns

Platform Name clvk
Number of devices 2
Device Name V3D 4.2
Device Vendor FIXME
Device Vendor ID 0x14e4
Device Version OpenCL 3.0 CLVK on Vulkan v1.2.230 driver 92680291
Device UUID 2ed13185-e77c-e2ea-cfd5-078818d4e3e5
Driver UUID d8feebe8-ce41-fd54-834a-21889002e72b
Valid Device LUID No
Device LUID 0000-000000000000
Device Node Mask 0
Device Numeric Version 0xc00000 (3.0.0)
Driver Version 3.0 CLVK on Vulkan v1.2.230 driver 92680291
Device OpenCL C Version OpenCL C 1.2 CLVK on Vulkan v1.2.230 driver 92680291
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_images 0xc00000 (3.0.0)
__opencl_c_atomic_order_acq_rel 0xc00000 (3.0.0)
__opencl_c_atomic_scope_device 0xc00000 (3.0.0)
Latest comfornace test passed FIXME
Device Type GPU, Default
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 1
Max clock frequency 0MHz
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) 16
Preferred work group size multiple (kernel) 16
Max sub-groups per work group 0
Preferred / native vector sizes
char 1 / 1
short 1 / 1
int 1 / 1
long 1 / 1
half 1 / 1 (n/a)
float 1 / 1
double 1 / 1 (n/a)
Half-precision Floating-point support (n/a)
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 Yes
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 1073741824 (1024MiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing No
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 0 bytes
Global 0 bytes
Local 0 bytes
Atomic memory capabilities relaxed, acquire/release, work-group scope, device scope
Atomic fence capabilities relaxed, acquire/release, work-item scope, work-group scope, device scope
Max size for global variable 0
Preferred total size of global vars 0
Global Memory cache type None
Image support Yes
Max number of samplers per kernel 20
Max size for 1D images from buffer 4096 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 4096x4096 pixels
Max 3D image size 4096x4096x4096 pixels
Max number of read image args 16
Max number of write image args 4
Max number of read/write image args 4
Pipe support No
Max number of pipe args 0
Max active pipe reservations 0
Max pipe packet size 0
Local memory type Local
Local memory size 16384 (16KiB)
Max number of constant args 8
Max constant buffer size 65536 (64KiB)
Generic address space support No
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution No
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 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Non-uniform work-groups Yes
Work-group collective functions No
Sub-group independent forward progress Yes
IL version SPIR-V_1.0
ILs with version SPIR-V 0x400000 (1.0.0)
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Built-in kernels with version (n/a)
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_extended_versioning cl_khr_create_command_queue cl_khr_il_program cl_khr_spirv_no_integer_wrap_decoration cl_arm_non_uniform_work_group_size cl_khr_suggested_local_work_size cl_khr_3d_image_writes cl_khr_device_uuid
Device Extensions with Version cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 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_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_arm_non_uniform_work_group_size 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)
cl_khr_device_uuid 0x400000 (1.0.0)

Device Name llvmpipe (LLVM 11.0.1, 128 bits)
Device Vendor FIXME
Device Vendor ID 0x10005
Device Version OpenCL 3.0 CLVK on Vulkan v1.0.2 driver 1
Device Numeric Version 0xc00000 (3.0.0)
Driver Version 3.0 CLVK on Vulkan v1.0.2 driver 1
Device OpenCL C Version OpenCL C 1.2 CLVK on Vulkan v1.0.2 driver 1
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_images 0xc00000 (3.0.0)
__opencl_c_atomic_order_acq_rel 0xc00000 (3.0.0)
__opencl_c_atomic_scope_device 0xc00000 (3.0.0)
__opencl_c_int64 0xc00000 (3.0.0)
__opencl_c_fp64 0xc00000 (3.0.0)
Latest comfornace test passed FIXME
Device Type CPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 1
Max clock frequency 0MHz
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 1024x1024x1024
Max work group size 1024
Preferred work group size multiple (device) 16
Preferred work group size multiple (kernel) 16
Max sub-groups per work group 0
Preferred / native vector sizes
char 1 / 1
short 1 / 1
int 1 / 1
long 1 / 1
half 1 / 1 (n/a)
float 1 / 1
double 1 / 1 (n/a)
Half-precision Floating-point support (n/a)
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 Yes
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 536870912 (512MiB)
Error Correction support No
Max memory allocation 134217728 (128MiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing No
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 0 bytes
Global 0 bytes
Local 0 bytes
Atomic memory capabilities relaxed, work-group scope
Atomic fence capabilities relaxed, work-item scope, work-group scope
Max size for global variable 0
Preferred total size of global vars 0
Global Memory cache type None
Image support Yes
Max number of samplers per kernel 20
Max size for 1D images from buffer 16384 pixels
Max 1D or 2D image array size 2048 images
Max 2D image size 16384x16384 pixels
Max 3D image size 4096x4096x4096 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 No
Max number of pipe args 0
Max active pipe reservations 0
Max pipe packet size 0
Local memory type Local
Local memory size 32768 (32KiB)
Max number of constant args 8
Max constant buffer size 65536 (64KiB)
Generic address space support No
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution No
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 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Non-uniform work-groups Yes
Work-group collective functions No
Sub-group independent forward progress Yes
IL version SPIR-V_1.0
ILs with version SPIR-V 0x400000 (1.0.0)
printf() buffer size 1048576 (1024KiB)
Built-in kernels (n/a)
Built-in kernels with version (n/a)
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_extended_versioning cl_khr_create_command_queue cl_khr_il_program cl_khr_spirv_no_integer_wrap_decoration cl_arm_non_uniform_work_group_size cl_khr_suggested_local_work_size cl_khr_3d_image_writes
Device Extensions with Version cl_khr_global_int32_base_atomics 0x400000 (1.0.0)
cl_khr_global_int32_extended_atomics 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_khr_byte_addressable_store 0x400000 (1.0.0)
cl_khr_extended_versioning 0x400000 (1.0.0)
cl_khr_create_command_queue 0x400000 (1.0.0)
cl_khr_il_program 0x400000 (1.0.0)
cl_khr_spirv_no_integer_wrap_decoration 0x400000 (1.0.0)
cl_arm_non_uniform_work_group_size 0x400000 (1.0.0)
cl_khr_suggested_local_work_size 0x400000 (1.0.0)
cl_khr_3d_image_writes 0x400000 (1.0.0)

NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) No platform
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [clvk]
clCreateContext(NULL, ...) [default] Success [clvk]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name clvk
Device Name V3D 4.2
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) Success (1)
Platform Name clvk
Device Name llvmpipe (LLVM 11.0.1, 128 bits)
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name clvk
Device Name V3D 4.2
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 clvk
Device Name V3D 4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant