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

[onert] can`t find openCL and mali lib in aarch64, arm32 #11592

Closed
jaemaning opened this issue Sep 26, 2023 · 11 comments
Closed

[onert] can`t find openCL and mali lib in aarch64, arm32 #11592

jaemaning opened this issue Sep 26, 2023 · 11 comments
Labels

Comments

@jaemaning
Copy link
Contributor

when I run onert_run, onert-minimal-app in aarch64, arm32 environment

I encountered the following warning:

ubuntu@ubuntu:~/0920outnoaddmodule_arm/bin$ ./onert_run ~/inception_v3.tflite
Model Filename /home/ubuntu/inception_v3.tflite
Can't load libOpenCL.so: libOpenCL.so: cannot open shared object file: No such file or directory
Can't load libGLES_mali.so: libGLES_mali.so: cannot open shared object file: No such file or directory
Can't load libmali.so: libmali.so: cannot open shared object file: No such file or directory
Couldn't find any OpenCL library.
===================================
MODEL_LOAD   takes 2467.064 ms
PREPARE      takes 1240.424 ms
EXECUTE      takes 1102.212 ms
- MEAN     :  1102.212 ms
- MAX      :  1102.212 ms
- MIN      :  1102.212 ms
- GEOMEAN  :  1102.212 ms
===================================

so I installed opencl library

sudo apt install ocl-icd-opencl-dev

and I encountered the below error when I run again

ubuntu@ubuntu:~/0920outnoaddmodule_aarch64/bin$ ./onert_run ~/inception_v3.tflite
Model Filename /home/ubuntu/inception_v3.tflite
Error during model prepare : clGetPlatformIDs

how do i resolve this problem ??

@hseok-oh
Copy link
Contributor

@ragmani Is rasberry pi board support OpenCL?

@glistening
Copy link
Contributor

AFAIK, no. It would be good to concentrate cpu backend only on x64 and {arm32 or arm64} considering duration SSAFY can put.

@KangInyeong
Copy link
Contributor

@ragmani Is rasberry pi board support OpenCL?

When I searched about OpenCL, our rasberry pi 4 doesn't support OpenCL.

So, if we want to get OpenCL, it seems that additional work like 'Vulkan driver' will be needed.

@glistening
Copy link
Contributor

@KangInyeong

  1. Yes, a few years ago, someone tried OpenCL open source on RPI4. But it seems not usable at least in our purpose.

  2. May I ask why do you try to run acl backend on RPi4?

  3. Could you try the following?

$ BACKENDS=cpu ./onert_run ~/inception_v3.tflite

@ragmani
Copy link
Contributor

ragmani commented Sep 26, 2023

Is rasberry pi board support OpenCL?

I don't know rasberry pi board does not support OpenCL.

@ragmani
Copy link
Contributor

ragmani commented Sep 26, 2023

May I ask why do you try to run acl backend on RPi4?

I heard that when they executed with a large model, cpu backend took a little long time(maybe 2 sec). I thought it would be faster if the model runs with acl backend.
And it seems that acl backend has more optimized kernels and supported operations.

@ragmani
Copy link
Contributor

ragmani commented Sep 26, 2023

@KangInyeong
If you have any board that supports openCL like odroid, you may be able to test acl backend with that device. If not, I think you will have to support only cpu backend. I'm sorry for delaying you due to my lack of knowledge about the limitation of rasberry pi board.

@KangInyeong
Copy link
Contributor

@KangInyeong

  1. Yes, a few years ago, someone tried OpenCL open source on RPI4. But it seems not usable at least in our purpose.
  2. May I ask why do you try to run acl backend on RPi4?
  3. Could you try the following?
$ BACKENDS=cpu ./onert_run ~/inception_v3.tflite

At first, We wanted to make sure all the features of runtime nnfw api work well after cross build. So, we thought the OpenCL issue was caused by an error in our work.

No error occurs with this command..! I think we can check the execution with that command for future work.

@KangInyeong
Copy link
Contributor

If you have any board that supports openCL like odroid, you may be able to test acl backend with that device. If not, I think you will have to support only cpu backend. I'm sorry for delaying you due to my lack of knowledge about the limitation of rasberry pi board.

Since there is no HW right now, I will proceed with the test with cpu only. Thank you for your advice!

@glistening
Copy link
Contributor

Sure, you can test cpu only on x64, arm32 and/or aarch64.

I thought you've chosen RPI4 because you can test both arm and aarch64 by installing 32-bit OS and 64-bit OS.
I hope you've got experience and learned more during trying acl backend.

@KangInyeong
Copy link
Contributor

I thought you've chosen RPI4 because you can test both arm and aarch64 by installing 32-bit OS and 64-bit OS.

Yes, we will continue to test arm and aarch64 via RPI4 with 32-bit OS and 64-bit OS installed. Thanks for your comments!!

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

No branches or pull requests

5 participants