ARM-software / armnn

Arm NN ML Software. The code here is a read-only mirror of https://review.mlplatform.org/admin/repos/ml/armnn
https://developer.arm.com/products/processors/machine-learning/arm-nn
MIT License
1.15k stars 307 forks source link

bash: ./UnitTests: cannot execute binary file: Exec format error #621

Closed aravind329 closed 2 years ago

aravind329 commented 2 years ago

we had tried on different ubuntu platforms but we had encountered same error can someone please help me with this

morgolock commented 2 years ago

Hi @aravind329

Could you please share the output of the command: file ./UnitTests

aravind329 commented 2 years ago

Screenshot (1270)

aravind329 commented 2 years ago

Screenshot (1270)_LI

MikeJKelly commented 2 years ago

Hi @aravind329

Exec format error probably means that the binary was compiled for an architecture other than the one being run on. Have you compiled for arm64 and try to run on x86, for example?

If you run file ./UnitTests like Pablo suggested it will tell you what the architecture the unit tests were compiled for, for example, if it's compiled for an arm64 machine it will look like this:

./UnitTests: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /system/bin/linker64, with debug_info, not stripped That will not run on an x86 machine.

aravind329 commented 2 years ago

Hi @MikeJKelly Thank you for your suggestion but we are trying for the cross compilation we are very new to this platform so please suggest an OS where we can compile and run on arm64 if possible please share Docs which we can follow

MikeJKelly commented 2 years ago

Hi @aravind329

we have a cross-compilation guide at https://github.com/ARM-software/armnn/blob/branches/armnn_22_02/BuildGuideCrossCompilation.md which explains how to build aarch64 binaries using x86.

In order to run that code you will need a device with an Arm CPU to run that, what kind of hardware do you have with Arm CPUs?

aravind329 commented 2 years ago

Hi @MikeJKelly We are using amd64 cpu for this crossbuild and also we followed the document which we found in your repo and can you please help us where to find an arm cpu we are searching them but we can't able to find them. it will be very helpful for our research.

MikeJKelly commented 2 years ago

Hi @aravind329

you might have more luck following some of our guides on developer.arm.com those guides include descriptions for working with Raspberry Pi or Odroid-N2 which are devices with Arm CPUs the Odroid-N2 has an Arm CPU and GPU.

https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides

If you just want to run ArmNN on x86 you can just build for x86 or download the but you will only be able to build the Reference backend and not Neon or CL.

aravind329 commented 2 years ago

Hi @MikeJKelly Thank You For Your support we had successfully build our arm unittests and we run them on arm6 cpu. we had added some small operations and can you please help us with squeeze operation we are confused over this operation can you share an support document so which we can go forward in our research Thank You

TeresaARM commented 2 years ago

Hi @aravind329

Squeeze is a known operation, present in most known frameworks:

It is a specific case of reshape, so we parse it to the reshape layer in Arm NN.

Regards

aravind329 commented 2 years ago

Thanks, I'll check it out.

On Mon, Mar 21, 2022, 16:33 TeresaARM @.***> wrote:

Hi @aravind329 https://github.com/aravind329

Squeeze is a known operation, present in most known frameworks:

It is a specific case of reshape, so we parse it to the reshape layer in Arm NN.

Regards

— Reply to this email directly, view it on GitHub https://github.com/ARM-software/armnn/issues/621#issuecomment-1073760628, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSADH3UX64JRHE777NEOUTVBBJQXANCNFSM5QXTSBLA . You are receiving this because you were mentioned.Message ID: @.***>

TeresaARM commented 2 years ago

Thank you for your questions! I will close the ticket as the issue is solved now. Please do not hesitate to contact us again! Kindest Regards

aravind329 commented 2 years ago

Thanks a lot. For giving so much time and support.

On Mon, Mar 21, 2022, 16:52 TeresaARM @.***> wrote:

Closed #621 https://github.com/ARM-software/armnn/issues/621.

— Reply to this email directly, view it on GitHub https://github.com/ARM-software/armnn/issues/621#event-6274668744, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARSADHYDK22Z3OTRYWXB5O3VBBLXBANCNFSM5QXTSBLA . You are receiving this because you were mentioned.Message ID: @.***>