armnn icon indicating copy to clipboard operation
armnn copied to clipboard

How to build ARM-NN-SDK FOR OpenGL Support .......?

Open pavanonchip opened this issue 8 years ago • 11 comments

Hi i have build compute library like this "scons Werror=1 -j36 debug=0 asserts=1 neon=0 opencl=0 gles_compute=1 embed_kernels=1 os=linux arch=armv7a build=cross_compile" build is SUCCESSFUL

But when bulding ARM-NN-SDK and linking compute library i have found only two flages:-

If you are supporting NEON, add this argument to the CMake command: -DARMCOMPUTENEON=1 If you are supporting OpenCL, add this argument to the CMake command: -DARMCOMPUTECL=1

their any flag like above for OpenGL
How to enable armnn-sdk support for OpenGL ..... ?

pavanonchip avatar Oct 30 '18 11:10 pavanonchip

Hi @pavanonchip,

ArmNN doesn't have any integration of the Compute Library GLES code. If you need it I can add it to our roadmap?

It would be helpful if you could explain a little about how you intend to use ArmNN and why a GLES backend would be useful.

Many thanks, Matthew

MatthewARM avatar Oct 30 '18 11:10 MatthewARM

Hi @pavanonchip,

ArmNN doesn't have any integration of the Compute Library GLES code. If you need it I can add it to our roadmap?

It would be helpful if you could explain a little about how you intend to use ArmNN and why a GLES backend would be useful.

Many thanks, Matthew

Hi @MatthewARM,

We are planning to use ARMNN on Rasberry Pi with Linux. To improve the inference performance on Rasberry Pi, we want to use Compute Library GLES with ARMNN.

we found opengles-stubs in Compute Library, if i fill the stubs how can i build ARMNN-SDK.....?.

Thanks

pavanonchip avatar Oct 30 '18 12:10 pavanonchip

Hi @pavanonchip that is quite a bit of work, you'd have to write a new backend for ArmNN, you can use one of the existing backends (NEON, CL and Ref) as a model. In your new backend you would implement each workload by calling the appropriate Compute Library GLES function.

MatthewARM avatar Oct 30 '18 12:10 MatthewARM

@pavanonchip : You need GLES with Compute Shader support. If your GPU doesn't come with OpenCL on Linux it is unlikely it will support GLES Compute Shaders. Have you checked ?

AnthonyBarbier avatar Oct 30 '18 13:10 AnthonyBarbier

Hi @pavanonchip I hope we were able to answer your question and I wish you good luck with your investigation.

MatthewARM avatar Nov 29 '18 00:11 MatthewARM

ArmNN doesn't have any integration of the Compute Library GLES code. If you need it I can add it to our roadmap?

Does Arm NN provide any support to OpenGL/Vulkan at the moment? Is it part of the roadmap?

csn1800 avatar Sep 28 '22 16:09 csn1800

@csn1800 doesn't have any built-in backends that support OpenGL or Vulkan. The only built-in backend for GPU is the GpuAcc backend which uses Compute Library OpenCL routines.

There's currently no intention from the core development team to add new backends for OpenGL or Vulkan, but if someone else wanted to add support then we could definitely have a talk about it.

I would say that the GPU delegate in Tensorflow Lite works on GLES and is pretty good. If you're able to use tflite files and the Tensorflow Lite runtime that could be a good option. Would that fit your needs? What kind platform are you running on? (Linux / Android / Windows, what GPU?)

MatthewARM avatar Sep 29 '22 09:09 MatthewARM

@MatthewARM The performance obtained by using TFLite OpenGL delegate (on model - Movenet/single pose/Thunder) is not as expected (high latency) and there are multiple missing ops when run on GPU. The platform is Linux (armv7l) with Mali G31 GPU. Can the use of Compute Library bring some performance improvements in this context?

csn1800 avatar Sep 29 '22 16:09 csn1800

@morgolock can you help? G31 is a very small GPU, and depending on what CPU you have you're almost certainly better off running on the CPU, in which case Compute Library NEON might help vs. TfLite ruy/xnnpack.

MatthewARM avatar Sep 30 '22 09:09 MatthewARM

Hmm, on the other hand if your architecture is armv7l you're probably better sticking with TfLite - Compute Library is focussed on aarch64 optimisations.

MatthewARM avatar Sep 30 '22 09:09 MatthewARM

Hi @csn1800

Can you please provide more details about the platform you ran the model? Which device and OS are you using? What's the datatype for the model? What's the exact command you used to run the model?

As Matthew mentioned, in Arm Compute Library there is legacy support for armv7a but the code is not as optimized as for aarch64 targets.

morgolock avatar Sep 30 '22 12:09 morgolock