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

OPENCL initialization failed - Without GPU support #32

Closed
ymotola opened this issue Jan 10, 2018 · 7 comments
Closed

OPENCL initialization failed - Without GPU support #32

ymotola opened this issue Jan 10, 2018 · 7 comments

Comments

@ymotola
Copy link

ymotola commented Jan 10, 2018

I am working on a iMX6 quad core cpu with Vivante GC2000 GPU.
After building CaffeOnAcl according to installation instructions I try to run the classification example as shown.
No matter what I do, I keep getting:
"OPENCL initialization failed"

I am working with OpenCL and I know it is working properly.
The tests in the CaffeOnAcl - Unit tests also throw segmentation fault after a few successful tasks.
I already Compiled protobuf from scratch and removed opencl_dnn library from my /usr/lib (two solutions that where suggested in some forums) but nothing helps.

Please help!!!

System configuration

Operating system: Yocto - Poky 1.8.2
Compiler: arm-poky-linux-gnueabi-gcc
CUDA version (if applicable): none
CUDNN version (if applicable): none
BLAS: OpenBlas
Python or MATLAB version (for pycaffe and matcaffe respectively): Python 2.7

@joey2014
Copy link

@ymotola You may run Arm Compute Library test first to check if it support Vivante GC2000 GPU.

@honggui honggui closed this as completed Jan 15, 2018
@ymotola
Copy link
Author

ymotola commented Jan 15, 2018

Hi Joey,
Is it possible to use only NEON?
What should I do except for building the ACL with opencl=0 and the CaffeOnACL with USE_CPU=1?

@ymotola
Copy link
Author

ymotola commented Jan 18, 2018

Hello,

@honggui Please re-open this thread.
I compiled the CaffeOnACL with CPU_ONLY=1 but the ARM Compute library with OpenCL as suggested in other posts https://github.com/OAID/caffeOnACL/issues/8 otherwise it won't compile.
Even tough, I still get "OPENCL initialization failed" when I try to run the tests, why?

Maybe it is not related to the GPU...
When I try to run the classification.bin sample I get the following:

HDF5-DIAG: Error detected in HDF5 (1.8.20) thread 0:
#000: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#1: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7711 in H5T__conv_long_float(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#2: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#3: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#4: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7686 in H5T__conv_uint_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#5: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#6: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#7: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7611 in H5T__conv_int_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#8: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#9: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#10: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7536 in H5T__conv_ushort_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#11: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#12: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#13: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7461 in H5T__conv_short_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#14: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#15: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#16: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7386 in H5T__conv_uchar_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#17: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#18: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#19: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7311 in H5T__conv_schar_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#20: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#21: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#22: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7235 in H5T__conv_ldouble_double(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#23: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#24: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#25: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7208 in H5T__conv_ldouble_float(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#26: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#27: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#28: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7181 in H5T__conv_double_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
#29: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 2274 in H5T_register(): unable to locate/allocate conversion path
major: Datatype
minor: Unable to initialize object
#30: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5T.c line 4476 in H5T_path_find(): unable to initialize conversion function
major: Datatype
minor: Unable to initialize object
#31: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Tconv.c line 7122 in H5T__conv_float_ldouble(): disagreement about datatype size
major: Datatype
minor: Unable to initialize object
HDF5-DIAG: Error detected in HDF5 (1.8.20) thread 0:
#000: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5F.c line 602 in H5Fopen(): unable to open file
major: File accessibilty
minor: Unable to open file
#1: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Fint.c line 1131 in H5F_open(): problems closing file
major: File accessibilty
minor: Unable to close file
#2: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Fint.c line 842 in H5F_dest(): can't get property list
major: Invalid arguments to routine
minor: Inappropriate type
#3: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Fint.c line 1085 in H5F_open(): unable to read superblock
major: File accessibilty
minor: Read failed
#4: /home/yoel/poky/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/hdf5/1.8.20-r0/hdf5-1.8.20/src/H5Fsuper.c line 269 in H5F_super_read(): can't get property list
major: Invalid arguments to routine
minor: Inappropriate type
F0118 11:56:23.967454 13761 net.cpp:799] Check failed: file_hid >= 0 (-1 vs. 0) Couldn't open models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel
*** Check failure stack trace: ***
@ 0xb532165c (unknown)
@ 0xb53236e4 (unknown)
@ 0xb5321200 (unknown)
@ 0xb53240f0 (unknown)
@ 0xb6dadc2c caffe::Net<>::CopyTrainedLayersFromHDF5()
@ 0xb6db1194 caffe::Net<>::CopyTrainedLayersFrom()
@ 0xdda0 Classifier::Classifier()
@ 0xb4a4 main
@ 0xb4249d7c (unknown)
@ 0xb9dc (unknown)
Aborted

If I run "unit_tests/test" from CaffeOnACL with GDB, I get segmentation fault from here:

0xb4aa551c in arm_compute::a32_sgemm_8x6(float const*, float const*, float*, int, int, int)
() from /usr/lib/../lib/libarm_compute.so

I can't get a trace further than that.

@ymotola ymotola changed the title OPENCL initialization failed OPENCL initialization failed - Without GPU support Jan 18, 2018
@joey2014
Copy link

@ymotola this version need Arm Compute Library compile with OpenCL, Next version will support Neon only with compile flag.
From you call dump:
F0118 11:56:23.967454 13761 net.cpp:799] Check failed: file_hid >= 0 (-1 vs. 0) Couldn't open models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel

do you have the file bvlc_reference_caffenet.caffemodel in models/bvlc_reference_caffenet?

@ymotola
Copy link
Author

ymotola commented Jan 23, 2018

I have compiled ACL with OpenCL, this was the only way I could compile the CaffeOnACL.
I do have this model.
Whats are all those errors about HDF5?

@joey2014
Copy link

at least , caffe report it can't open the file
F0118 11:56:23.967454 13761 net.cpp:799] Check failed: file_hid >= 0 (-1 vs. 0) Couldn't open models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel

from net.cpp:799
template
void Net::CopyTrainedLayersFromHDF5(const string trained_filename) {
#ifdef USE_HDF5
hid_t file_hid = H5Fopen(trained_filename.c_str(), H5F_ACC_RDONLY,
H5P_DEFAULT);
CHECK_GE(file_hid, 0) << "Couldn't open " << trained_filename;

You can see caffe failed to open your model file.

@ymotola
Copy link
Author

ymotola commented Jan 28, 2018

I checked again, and the file does exists.
I also downloaded everything again but the same error persists.
What can be the cause it couldn't open this file?

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

3 participants