ARM-software / ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
2.87k stars 782 forks source link

terminating with uncaught exception of type std::runtime_error: in get_mali_hw_info #1013

Closed Saikatsaha1996 closed 1 year ago

Saikatsaha1996 commented 1 year ago

Os Android Android version 12 Cpu Dimensity 8100 GPU Mali -G610 MC6 Using in Termux Termux cannot find the OpenCL driver.. With adreno OpenCL GPU no issues.. Only facing with Mali GPU

I want to build compute library.. But i can't build..

Because my device cannot find OpenCL library..

I also checked in clinfo tool Still number of platforms 0 reporting..

Where I can find OpenCL library?

when i export LD_LIBARY_PATH not working.. IMG_20221209_200116 IMG_20221209_200034

Saikatsaha1996 commented 1 year ago

So Arm-Mali G610 GPU haven't OpenCL driver? 😑

IMG_20221210_053301 IMG_20221210_053207 IMG_20221210_053227

Saikatsaha1996 commented 1 year ago

@morgolock in Mali GPU G-610 OpenCL not available?

Screenshot_2022-12-11-22-11-09-073_com primatelabs geekbench5

Saikatsaha1996 commented 1 year ago

@morgolock in Mali GPU G-610 OpenCL not available?

Screenshot_2022-12-11-22-11-09-073_com primatelabs geekbench5

New generation Mali GPU driver has complex.. No Android benchmark application working for this OpenCL loader issue... But termux development team solved this issue.. I will closing.. Screenshot_2022-12-12-07-54-34-217_com termux Screenshot_2022-12-12-07-54-45-810_com termux

Saikatsaha1996 commented 1 year ago

@morgolock sorry for ping but i want help Not a single application running with termux Android This is not termux issue because another device working fine.. Android version 12 Xiaomi K50I 5G device

I know for this issue i can't ask Xiaomi.. Thats why asking here.. If anyone available for help it will very much helpful for me..

GPU Mali G-610 MC6 (Android) But all applications running fine with GPU Mali G-56 (Android)

I export LD_LIBARY_PATH but not working for Mali -G610

error code

Completed SGEMM in 723.338 ms with status 0
FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x745a583f48)
Aborted

And some applications force closed

But working fine with Mali G-56 For Mali G610 OpenCL driver have any issues? I want to ask arm community but i don't know i can't login to my account.. That's why asking here.. Please help! Thank you

Saikatsaha1996 commented 1 year ago

🥲

Build with

scons arch=arm64-v8a neon=1 opencl=1 embed_kernels=1 extra_cxx_flags="-fPIC -fopenmp -static-openmp" benchmark_tests=1 validation_tests=1 os=android Werror=0 asserts=0 validate_examples=1 validate_examples=1 openmp=1 install_dir=$PREFIX extra_link_flags="-fPIC -fopenmp -static-openmp" mali=yes benchmark_examples=yes openmp=yes -j8

terminating with uncaught exception of type std::runtime_error: in get_mali_hw_info tests/framework/instruments/MaliCounter.cpp:62: Failed to check version. [1] 21024 abort benchmark_cl_gemm_native --instruments=ALL

Screenshot_2022-12-19-06-12-10-512_com termux Screenshot_2022-12-19-06-15-21-376_com termux

morgolock commented 1 year ago

Hi @Saikatsaha1996

Please share the plain text output from the command line instead of screenshots, it's easier to help with plaintext.

From looking at the images it seems the device is not properly configured, either the drivers or a problem with LD_LIBRARY_PATH

Can you please share the output of the commad ls /dev/mali0 -al ?

Hope this helps

Saikatsaha1996 commented 1 year ago

Hi @Saikatsaha1996

Please share the plain text output from the command line instead of screenshots, it's easier to help with plaintext.

From looking at the images it seems the device is not properly configured, either the drivers or a problem with LD_LIBRARY_PATH

Can you please share the output of the commad ls /dev/mali0 -al ?

Hope this helps

~ $ ls /dev/mali0 -al
crw-rw-rw- 1 system graphics 10, 113 Jan  7 07:06 /dev/mali0
~ $

Actually the biggest problem with ld library path Generally ld library path should be export LD_LIBRARY_PATH=$PREFIX/lib:/vendor/lib64:/vendor/lib64/egl

But my ld library path is export LD_LIBRARY_PATH=/vendor/lib64:/vendor/lib64/mt6895:/vendor/lib64/egl/mt6895

But yes termux created opencl-vendor-driver for Mali GPU only.. working fine every other applications..

One more thing i am on android.. /dev/dri/renderD128 is missing in android platform?

Because i am trying to use Mesa-Panfrost-Mali GPU driver but i can't use because it is missing in my device..

~ $ ls -l /dev/dri/renderD128
ls: cannot access '/dev/dri/renderD128': No such file or directory

Actually i am new to Arm-Mali platform.. Where i can find my Mali-GPU render* in android?

Only computelibrary not recognise..

morgolock commented 1 year ago

Hi @Saikatsaha1996

I'd suggest using adb shell rather than Termux. I'd run clinfo within an adb shell to see if OpenCL is working. If that's working the next step is running arm_compute_validation.

This looks like a problem with the device configuration or Termux