-
Notifications
You must be signed in to change notification settings - Fork 80
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
Errors with VC4C. How to use CPU also? Is LD_LIBRARY_PATH=/usr/local/lib/ required before programs? #45
Comments
For (1): For (2): For (3):
So you have a device 0 when mesa is installed and it disappears when mesa is uninstalled?
Looks like the OpenCL support for the CPU (via mesa) is already there (if you install mesa again).
This is a common problem for some Raspbian installations. You will need to add
See above, mesa is the implementation running on the CPU.
Where do you get these error messages? What are you trying to compile while you get them? |
Thank you for the quick and thorough response. My follow-up is in two parts. (A) In answer to, Platform Name Clover Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU Platform Name Clover NULL platform behavior ICD loader properties (B) Reponding to "Where do you get these error messages? What are you trying to compile while you get them?" (i) The output from "hashcat -I" without mesa-opencl-icd. OpenCL Info: Platform ID #1 Device ID #1 (ii) The output from "hashcat -I" with mesa-opencl-icd. clGetDeviceIDs(): CL_DEVICE_NOT_FOUND OpenCL Info: Platform ID #1 Device ID #1 Platform ID #2 (iii) With mesa-opencl-icd installed, the output of "hashmark --benchmark" up to the line prior to the errors. Note, "CL_DEVICE_NOT_FOUND" does not appear when mesa-opencl-icd is not installed (shown below). Benchmarking uses hand-optimized kernel code by default. clGetDeviceIDs(): CL_DEVICE_NOT_FOUND clGetDeviceIDs(): CL_DEVICE_NOT_FOUND OpenCL Platform #1: doe300
OpenCL Platform #2: Mesa, skipped or no OpenCL compatible devices found. Benchmark relevant options:
Hashmode: 0 - MD5 clBuildProgram(): CL_COMPILE_PROGRAM_FAILURE (iv) Without mesa-opencl-icd installed (i.e. I just did "apt-get purge mesa-opencl-icd), the full output of "hashmark --benchmark". Benchmarking uses hand-optimized kernel code by default. OpenCL Platform #1: doe300
Benchmark relevant options:
Hashmode: 0 - MD5 clBuildProgram(): CL_COMPILE_PROGRAM_FAILURE [E] Mon Oct 8 21:01:22 2018: (1) /usr/local/lib/libVC4CC.so.1.2 : vc4c::CompilationError::CompilationError(vc4c::CompilationStep, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)+0xf4 [0x6fd560cc]
Started: Mon Oct 8 21:01:16 2018 I welcome your thoughts on fixing the issue with the use of the GPU and having OpenCL recognize the CPU. |
Okay, so why the Mesa implementation has no devices, I don't know. As to the compilation errors in hashcat: It looks like some error occurs in the precompilation (CLang trying to compile the OpenCL C code). I don't know why the actual error message is not printed though... |
./build/test/TestVC4CL How do I run the latter tests on the link? Or am I misinterpreting what I see? Also, could you tell me what I can/should do to compile CLang (instead of using the Raspian package) such that it gives debug information? I would prefer to create the custom .deb(s) from the edited source .deb(s), rather than the tarball, but I suppose either would do. |
Hi.
Thank you for creating VC4VL. I am very eager to implement it on several machines.
On a RPi, I have compiled and installed VC4C and VC4CL including tools, but not test.
I do not yet have VC4VL functional. Details of three problems follow.
(1) In VC4C ./build/test/TestVC4C gave an enormity of errors! I mean page after page. I issued this command, as root, after cmake, make, and make install of both VC4CLStdLib and VC4C (but not VC4CL). After about 45min, and two and a half pages of
"64-bit operations are not supported by the VideoCore IV architecture, further compilation may fail!"
the program stopped. Another shell showed cpu usage at 100%, so after 15min, I killed the program.
Is this behavior normal?
(2) When I issue "cmake" in the directory named "test" I see,
cmake ../test
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:10 (ExternalProject_Get_Property):
Unknown CMake command "ExternalProject_Get_Property".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such as
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring incomplete, errors occurred!
See also "/home/VC4C/VC4CL/test/CMakeFiles/CMakeOutput.log".
(3) clinfo shows Device 0 when mesa-opencl-icd is installed, which I presume means it is a superfluous. Please, correct me if I am wrong. I removed mesa-opencl-icd and Device 0 disappeared.
I want to do a comparison of efficacy between the GPU's and the CPU's use of OpenCL. How may I implement OpenCL support for the RPi's CPU?
The full output of clinfo is below. Note, I had to use the prefix for clinfo to work.
LD_LIBRARY_PATH=/usr/local/lib/ clinfo
Number of platforms 1
Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU
Platform Vendor doe300
Platform Version OpenCL 1.2 VC4CL 0.4
Platform Profile EMBEDDED_PROFILE
Platform Extensions cl_khr_il_program cl_khr_spir cl_altera_device_temperature cl_altera_live_object_tracking cl_khr_icd cl_vc4cl_performance_counters
Platform Extensions function suffix VC4CL
Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU
Number of devices 1
Device Name VideoCore IV GPU
Device Vendor Broadcom
Device Vendor ID 0xa5c
Device Version OpenCL 1.2 VC4CL 0.4
Driver Version 0.4
Device OpenCL C Version OpenCL C 1.2
Device Type GPU
Device Profile EMBEDDED_PROFILE
Max compute units 1
Max clock frequency 300MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Max work item dimensions 3
Max work item sizes 12x12x12
Max work group size 12
Preferred work group size multiple 1
Preferred / native vector sizes
char 16 / 16
short 16 / 16
int 16 / 16
long 0 / 0
half 0 / 0 (n/a)
float 16 / 16
double 0 / 0 (n/a)
Half-precision Floating-point support (n/a)
Single-precision Floating-point support (core)
Denormals No
Infinity and NANs No
Round to nearest No
Round to zero Yes
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 67108864 (64MiB)
Error Correction support No
Max memory allocation 67108864 (64MiB)
Unified memory for Host and Device Yes
Minimum alignment for any data type 64 bytes
Alignment of base address 512 bits (64 bytes)
Global Memory cache type Read/Write
Global Memory cache size <printDeviceInfo:89: get CL_DEVICE_GLOBAL_MEM_CACHE_SIZE : error -30>
Global Memory cache line 64 bytes
Image support No
Local memory type Global
Local memory size 67108864 (64MiB)
Max constant buffer size 67108864 (64MiB)
Max number of constant args 64
Max size of kernel argument 256
Queue properties
Out-of-order execution No
Profiling Yes
Prefer user sync for interop Yes
Profiling timer resolution 1ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
printf() buffer size 0
Built-in kernels
Device Available Yes
Compiler Available Yes
Linker Available Yes
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_nv_pragma_unroll cl_arm_core_id cl_ext_atomic_counters_32 cl_khr_initialize_memory cl_arm_integer_dot_product_int8 cl_arm_integer_dot_product_accumulate_int8 cl_arm_integer_dot_product_accumulate_int16
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) OpenCL for the Raspberry Pi VideoCore IV GPU
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [VC4CL]
clCreateContext(NULL, ...) [default] Success [VC4CL]
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name OpenCL for the Raspberry Pi VideoCore IV GPU
Device Name VideoCore IV GPU
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 OpenCL for the Raspberry Pi VideoCore IV GPU
Device Name VideoCore IV GPU
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
(1) How may I run clinfo (and other programs) without LD_LIBRARY_PATH=/usr/local/lib/ preceding a command short of making symlinks to /usr/lib/?
(2) How may I bring up the CPU as a second (and/or alternative) device?
(3) The device in clinfo's output is not usable owing to errors such as vc4c::CompilationError::CompilationError,vc4c::precompilation::compileOpenCLWithDefaultHeader, etc. I need to know how to diagnose the underlying cause. Is ./build/test/TestVC4C supposed to give multiple pages of errors and then freeze? If so, where else can I look?
I would be very grateful for any assistance with these problems.
The text was updated successfully, but these errors were encountered: