ck caffe-classification-opencl on DragonBoard410c

50 views
Skip to first unread message

Szilárd Papp

unread,
Aug 24, 2017, 5:46:47 AM8/24/17
to collective-knowledge
Hi,

I'm trying to make caffe-classification-opencl work on a DragonBoard410c with android 5.1.
I'm able to compile it, but when I try to run it on the board, I receive some linker errors.

(printing output files) 

    * tmp-output1.tmp

      executing code ...
      WARNING: linker: ./classification: unused DT entry: type 0x6ffffffe arg 0xdb20
      WARNING: linker: ./classification: unused DT entry: type 0x6fffffff arg 0x1
      WARNING: linker: libcaffe.so: unused DT entry: type 0x6ffffffe arg 0x2939e8
      WARNING: linker: libcaffe.so: unused DT entry: type 0x6fffffff arg 0x3
      WARNING: linker: librtlxopenme.so: unused DT entry: type 0x6ffffffe arg 0x890
      WARNING: linker: librtlxopenme.so: unused DT entry: type 0x6fffffff arg 0x1
      Use GPU with device ID 0
      terminate called after throwing an instance of 'viennacl::ocl::invalid_value'
        what():  ViennaCL: FATAL ERROR: CL_INVALID_VALUE.
      If you think that this is a bug in ViennaCL, please report it at viennacl...@lists.sourceforge.net and supply at least the following information:
       * Operating System
       * Which OpenCL implementation (AMD, NVIDIA, etc.)
       * ViennaCL version
      Many thanks in advance!
      Aborted

I've found this on the installation page, but I don't really know what I should do with it:

Qualcomm Adreno GPU

Download and install drivers and SDK from this page.


Do you have any idea what the problem might be?

Best Regards,
Szilard



Anton Lokhmotov

unread,
Aug 24, 2017, 7:26:37 AM8/24/17
to collective...@googlegroups.com
Hi Szilárd,

I have a DragonBoard 410c too. If you use the official 96boards image,
you should have an OpenCL driver installed. However, the driver is 2-3
years old, and not the most stable. (I recall having some problems
with it.) At the same time, I think the linker errors are harmless.

Could you please provide the commands you used to compile
"program:caffe-classification-opencl" and possible launch options
(e.g. which model you use), and I will try to reproduce on my end.

If you don't remember, you can start from scratch:

$ ck clean env --tags=target-os-android21-arm64

(add --force to avoid answering 'y' to all).

Then record you session e.g. with:

$ script
Script started, file is typescript
< your session here>
$ exit
Script done, file is typescript

and send me the typescript file.

Good luck!
Anton.
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to collective-knowl...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Szilárd Papp

unread,
Aug 24, 2017, 7:41:40 AM8/24/17
to collective-knowledge
Hi Anton!

I chose these options when they popped up:
ck compile program:caffe-time-opencl --target=DragonBoard410c

1) Android NDK GCC compiler - v4.9.x
0) lib-caffe-bvlc-opencl-viennacl-universal  Version master
1) lib-opencv-2.4.13.2  Version 2.4.13.2
0) lib-viennacl-master-universal-src  Version master
2) lib-protobuf-3.1.0-host
0) Version 5.4.0 - /usr/bin/gcc

Other dependencies:

android22-arm64    64 OpenCL library      1.2                      
android22-arm64    64 OpenBLAS library    0.2.19-85636ff           
android22-arm64    64 GLog library        development-2a6df66      
android22-arm64    64 GFlags library      2.2.0  
android22-arm64    64 Boost library       1.62.0
android22-arm64    64 xOpenME run-time library   0.3

The dragonboard basically stands for android22-arm64.

Best Regards,
Szilard

Anton Lokhmotov

unread,
Aug 24, 2017, 8:44:36 AM8/24/17
to collective...@googlegroups.com
Hi Szilárd,

Thanks! This should be enough for me to reproduce. Please give me 1-2 days.

By the way, it looks like you've figured out how to use
"--target=DragonBoard410c", which Grigori added for the CK-WA project
(CK wrappers for ARM's Workload Automation). However, we haven't
advertised this functionality widely in relation to CK-Caffe. Well
done!

Cheers,
Anton.
>> > email to collective-knowl...@googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to collective-knowl...@googlegroups.com.

Szilárd Papp

unread,
Aug 24, 2017, 11:03:04 AM8/24/17
to collective-knowledge
Hi Anton,

Thank you for your help, I'm looking forward to your response.

BR,
Szilard
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Grigori Fursin

unread,
Aug 24, 2017, 3:02:29 PM8/24/17
to collective...@googlegroups.com
BTW, Szilard, may I ask you to run this command and send us the output, please:

$ ck detect platform.gpgpu --opencl --target=DragonBoard410c

This CK widget collects some low-level info about target platform including OpenCL driver version.

Thanks,
Grigori
To unsubscribe from this group and stop receiving emails from it, send an email to collective-knowl...@googlegroups.com.

Anton Lokhmotov

unread,
Aug 24, 2017, 6:27:45 PM8/24/17
to collective...@googlegroups.com
$ ck detect platform.gpgpu --opencl --target=android21-arm64

{
"gpgpu": {
"vendor": "QUALCOMM",
"type": "opencl",
"name": "QUALCOMM Adreno(TM)"
},
"gpgpu_misc": {
"address bits": "32",
"parallel compute units": "1",
"build date": "08/05/15 Wed",
"work-item dimensions": "3",
"- max work-item size #1": "256",
"- max work-item size #0": "256",
"opencl c version": "OpenCL C 1.1 Adreno(TM) 306",
"local branch": "",
"remote branch":
"refs/tags/AU_LINUX_ANDROID_LA.BR.1.2.4_RB1.05.01.01.121.018 Compiler
E031.25.03.04",
"software (driver) version": "OpenCL 1.1 QUALCOMM build",
"- max work-item size #2": "256",
"warning": "linker",
"hardware (device) version": "OpenCL 1.1 Adreno(TM) 306"
},
"gpgpu_id": {
"gpgpu_device_id": "0",
"gpgpu_platform_id": "0"

Anton Lokhmotov

unread,
Aug 24, 2017, 7:13:30 PM8/24/17
to collective...@googlegroups.com
Here's the output of :

$ ck run program:caffe-classification-opencl --target_os=android22-arm64

WARNING: linker: ./classification: unused DT entry: type
0x6ffffffe arg 0xd9d0
WARNING: linker: ./classification: unused DT entry: type
0x6fffffff arg 0x1
WARNING: linker: libcaffe.so: unused DT entry: type 0x6ffffffe
arg 0x276b00
WARNING: linker: libcaffe.so: unused DT entry: type 0x6fffffff arg 0x3
WARNING: linker: librtlxopenme.so: unused DT entry: type
0x6ffffffe arg 0x890
WARNING: linker: librtlxopenme.so: unused DT entry: type
0x6fffffff arg 0x1
Use GPU with device ID 0
---------- Prediction for data.jpg ----------
ViennaCL: FATAL ERROR: Could not find kernel 'fill_float' from program ''
Number of kernels in program: 0
terminate called after throwing an instance of
'viennacl::ocl::kernel_not_found'
what(): Kernel not found
Aborted

Get the same error with e.g. GoogleNet and SqueezeNet 1.1. It looks
like the kernels are not properly integrated. Perhaps the options have
changed... Will have to look in more detail later.

Here's my environment for android22-arm64 built from scratch:

$ ck show env --tags=target-os-android22-arm64
Env UID: Target OS: Bits: Name:
Version: Tags:

7384573913189ef0 android22-arm64 64 xOpenME run-time library
0.3
64bits,host-os-linux-64,lang-c,lang-cpp,lang-f77,lang-f90,lang-f95,lib,rtl,target-os-android22-arm64,v0,v0.3,xopenme
b0ff4827a35d4645 android22-arm64 64 ViennaCL library
master-d38dcb3
64bits,blas,host-os-linux-64,lib,opencl-blas,src,target-os-android22-arm64,v0,v0.0,viennacl,vmaster,vsrc
504669c874419bcb android22-arm64 64 ProtoBuf library
3.1.0
64bits,host-os-linux-64,lib,protobuf,target-os-android22-arm64,v3,v3.1,v3.1.0
04538be773128f77 android22-arm64 64 OpenCV library
2.4.13.2
64bits,host-os-linux-64,lib,opencv,target-os-android22-arm64,v2,v2.4,v2.4.13,v2.4.13.2
ea4203122d34ed06 android22-arm64 64 OpenCL library
1.2
64bits,host-os-linux-64,lang-c,lang-cpp,lib,opencl,target-os-android22-arm64,v1,v1.2
63425fa25b991b8a android22-arm64 64 OpenBLAS library
0.2.19-85636ff
64bits,blas,cblas,host-os-linux-64,lib,openblas,target-os-android22-arm64,v0,v0.2,v0.2.19,v0.2.19.0
3fcc2499468d8ada android22-arm64 64 GLog library
development-2a6df66
64bits,glog,host-os-linux-64,lib,target-os-android22-arm64,v0,v0.0,vmaster,vtrunk
4a842a3982fd7f71 android22-arm64 64 GFlags library
2.2.0
64bits,gflags,host-os-linux-64,lib,target-os-android22-arm64,v2,v2.2,v2.2.0
634b233d95401b82 android22-arm64 64 Boost library
1.64.0
64bits,boost,host-os-linux-64,lib,target-os-android22-arm64,v1,v1.64,v1.64.0
773ae6581ac0b779 android22-arm64 64 BVLC Caffe framework
(opencl,viennacl) master-73221fd
64bits,bvlc,caffe,host-os-linux-64,lib,target-os-android22-arm64,v0,v0.0,vopencl,vviennacl
a2f9c4708963944e android22-arm64 64 Android NDK LLVM compiler
3.8.275480
64bits,android,compiler,host-os-linux-64,lang-c,lang-cpp,llvm,ndk,target-os-android22-arm64,v3,v3.8,v3.8.275480
31fa48f1890a1795 android22-arm64 64 Android NDK GCC compiler
4.9.x
64bits,android,compiler,gcc,host-os-linux-64,lang-c,lang-cpp,ndk,target-os-android22-arm64,v4,v4.9,v4.9.0

Szilárd Papp

unread,
Aug 25, 2017, 2:58:57 AM8/25/17
to collective-knowledge
Hi Grigori,

The output for the ck detect command:

{
>>> >> > For more options, visit https://groups.google.com/d/optout.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> > Groups
>>> > "collective-knowledge" group.
>>> > To unsubscribe from this group and stop receiving emails from it, send
>>> > an
>>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "collective-knowledge" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "collective-knowledge" group.
>> To unsubscribe from this group and stop receiving emails from it, send an

Anton Lokhmotov

unread,
Aug 25, 2017, 4:37:19 AM8/25/17
to collective...@googlegroups.com
Hi Szilárd,

We seem to have the same setup: the hardware, the driver and the
packages. My failure, however, is different from yours. Which Caffe
model do you use? Please send the output of:

$ ck show env --tags=caffemodel

I have the same binaries working flawlessly on a Mediatek X20 board,
so the problem might be driver-related. As I said, the driver is over
2 years old. Perhaps it simply rejects the kernels. There might be
nothing we can do about that. I have a couple of other ideas though.
Will try them over the weekend.

Cheers,
Anton.
>> >>> >> > email to collective-knowl...@googlegroups.com.
>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>> >>> >
>> >>> > --
>> >>> > You received this message because you are subscribed to the Google
>> >>> > Groups
>> >>> > "collective-knowledge" group.
>> >>> > To unsubscribe from this group and stop receiving emails from it,
>> >>> > send
>> >>> > an
>> >>> > email to collective-knowl...@googlegroups.com.
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "collective-knowledge" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to collective-knowl...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "collective-knowledge" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> email to collective-knowl...@googlegroups.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to collective-knowl...@googlegroups.com.

Szilárd Papp

unread,
Aug 25, 2017, 4:48:35 AM8/25/17
to collective-knowledge
Hi Anton,

My Caffe model is:
 linux-64  Caffe model (net and weights) (deepscale, squeezenet, 1.1) deepscale-squeezenet-1.1

BR,
Szilard
>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>> >>> >
>> >>> > --
>> >>> > You received this message because you are subscribed to the Google
>> >>> > Groups
>> >>> > "collective-knowledge" group.
>> >>> > To unsubscribe from this group and stop receiving emails from it,
>> >>> > send
>> >>> > an
>> >>> > For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "collective-knowledge" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> For more options, visit https://groups.google.com/d/optout.
>> >>
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups
>> >> "collective-knowledge" group.
>> >> To unsubscribe from this group and stop receiving emails from it, send
>> >> an
>> >> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Grigori Fursin

unread,
Aug 25, 2017, 2:44:21 PM8/25/17
to collective...@googlegroups.com
Thanks, Szilárd,
Seems like OpenCL driver is the same as ours - Anton is investigating the Caffe issue further ...
Have a good weekend,
Grigori
To unsubscribe from this group and stop receiving emails from it, send an email to collective-knowl...@googlegroups.com.

Szilárd Papp

unread,
Aug 29, 2017, 10:20:11 AM8/29/17
to collective-knowledge
Thank you for your efforts guys!

Szilard

Szilárd Papp

unread,
Aug 31, 2017, 4:25:53 AM8/31/17
to collective-knowledge
Do you think I should try to flash the board with the "stable snapshot 99" version?

Szilard

Anton Lokhmotov

unread,
Aug 31, 2017, 5:33:42 PM8/31/17
to collective...@googlegroups.com
> Do you think I should try to flash the board with
> the "stable snapshot 99" version?

This may be a good idea. If you do that, could you please provide the
driver info again e.g.

$ ck detect platform.gpgpu --opencl --target=android21-arm64

Thanks!
Anton.
>>>> >>> >> > email to collective-knowl...@googlegroups.com.
>>>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the Google
>>>> >>> > Groups
>>>> >>> > "collective-knowledge" group.
>>>> >>> > To unsubscribe from this group and stop receiving emails from it,
>>>> >>> > send
>>>> >>> > an
>>>> >>> > email to collective-knowl...@googlegroups.com.
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> email to collective-knowl...@googlegroups.com.
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> email to collective-knowl...@googlegroups.com.
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "collective-knowledge" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to collective-knowl...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to collective-knowl...@googlegroups.com.

Szilárd Papp

unread,
Sep 1, 2017, 8:32:16 AM9/1/17
to collective-knowledge
I don't know how it is possible, but I have the exact same driver information for that command.
Is it possible that I had the same image on the board before?
I followed this documentation:
>>>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the Google
>>>> >>> > Groups
>>>> >>> > "collective-knowledge" group.
>>>> >>> > To unsubscribe from this group and stop receiving emails from it,
>>>> >>> > send
>>>> >>> > an
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "collective-knowledge" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an

Anton Lokhmotov

unread,
Sep 1, 2017, 12:14:42 PM9/1/17
to collective...@googlegroups.com
Actually, I am not surprised. Unfortunately, hardware vendors typically conclude that they haven no particular business reasons to support such community / hobbyist platforms with new driver releases... On the contrary, they'd rather you go and buy a new piece of their hardware :). What they often don't realise is that you might actually go and buy someone else's hardware :).

Anton.

>>>> >>> >> > email to collective-knowl...@googlegroups.com.
>>>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the Google
>>>> >>> > Groups
>>>> >>> > "collective-knowledge" group.
>>>> >>> > To unsubscribe from this group and stop receiving emails from it,
>>>> >>> > send
>>>> >>> > an
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "collective-knowledge" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "collective-knowledge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to collective-knowl...@googlegroups.com.

Szilárd Papp

unread,
Sep 4, 2017, 4:06:31 AM9/4/17
to collective-knowledge
Do you have any other idea or do you think it's a dead end?
Is it worth to try to build this:?
I don't really have any other ideas to make this work on the 410c.

Szilard
>>>> >>> >> > For more options, visit https://groups.google.com/d/optout.
>>>> >>> >
>>>> >>> > --
>>>> >>> > You received this message because you are subscribed to the Google
>>>> >>> > Groups
>>>> >>> > "collective-knowledge" group.
>>>> >>> > To unsubscribe from this group and stop receiving emails from it,
>>>> >>> > send
>>>> >>> > an
>>>> >>> > For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>> >>
>>>> >>
>>>> >> --
>>>> >> You received this message because you are subscribed to the Google
>>>> >> Groups
>>>> >> "collective-knowledge" group.
>>>> >> To unsubscribe from this group and stop receiving emails from it,
>>>> >> send an
>>>> >> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "collective-knowledge" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
> --
> You received this message because you are subscribed to the Google Groups
> "collective-knowledge" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "collective-knowledge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to collective-knowledge+unsub...@googlegroups.com.

Szilárd Papp

unread,
Sep 5, 2017, 11:14:00 AM9/5/17
to collective-knowledge
Eventually I've built it. After five hours and a few build errors I've successfully built and flashed it to the board.
In the readme file they mention that it is suggested to have 60GB free space for building. Fun fact: it required 111GB to successfully build it. :)
I still have the same output for the ck detect command.
Now I have segmentation fault with the classification-opencl.

(printing output files) 

    * tmp-output1.tmp

      executing code ...
      Use GPU with device ID 0
      Segmentation fault

/Szilard
Reply all
Reply to author
Forward
0 new messages