How to enable Opencl support on hikey960?


Thanks. but If you would like update your debian image someday, could you please add V4L/V4L2 support? thx.


You are aware you can simply download the kernel from (branch daedalean) and compile the support for that into your kernel right?

  1. git clone
  2. cd linux
  3. git checkout daedalean
  4. apt install build-essential gcc-aarch64-linux-gnu
  5. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu daedalean_defconfig
  6. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
  7. Enable V4L and whatever other option you want enabled.
  8. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image modules
  9. mkdir -p /tmp/tmp_install/boot
  10. make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=/tmp/tmp_install INSTALL_MOD_STRIP=1 modules_install
  11. cp arch/arm64/boot/Image /tmp/tmp_install/boot/Image-
  12. Transfer everything from /tmp/tmp_install to the hikey960 and modify /boot/grub/grub.cfg or similar to boot the new kernel.

And you are running your very own kernel on the hikey960.


So it seems that the problem for me is somehow related to the clinfo version in the debian-repositories. If i build clinfo from source i get some valid output. But there are still some errors if i try to run a opencl application. Maybe it is necessary to install the ARM computelibrary


Thank you bvermeul, it is working


Can you share pre compiled image for debian?


The pre-compiled kernel is on the debian image in /boot.


Thanks, can you provide related link?


It’s a little higher up in this thread.


I just flashed the However, I cannot login with “linaro”.
What is the login & pass ?


Please read the thread completely. All of the questions you’ve had up till now were in my responses to it.
In this case, user root, no password.


thanks, I cannot see wlan0 with
but I can access to /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
how to fix wifi problem?


Go through dmesg and check why the wifi driver isn’t loading. Fix any problems you find there (you can use google for many problems and get decent results at finding a solution).


@bvermeul do you have any prebuilt image for Hikey970?


What are you trying to do on Hikey970?


@nish I am trying to run a deep learning model on HiKey970, so I was wondering if a pre-built image with opencl support available?


Hi, please let me know what AI library you are using for DL. We have an image with tensorflow pre-built in it. We are still trying to make OpenCL work. But if you just want to run inference on your model, I think having GPU support (which is why OpenCL is needed) won’t matter. GPU only makes a difference while training a model.


Hi, I am using ssd mobilenet model in tensorflow. Yes i want to run inference on the model. It would be great if you could share your image or steps to produce the image or github details.

GPU only makes a difference while training a model.
Yes GPU definitely makes difference while training. However many time it helps in generating inference in real time.

Thanks a lot for quick response.


@allanmac How to point ICD at, could you please explain?


Using the command:

echo “path to” > /etc/OpenCL/vendors/mali.icd

will do this. Please make sure that /dev/mali* is owned by a group you are a part of, or to use any OpenCL programs as root or with sudo.


@nish could you please provide image for pre-built library?