Comments (6)
Ok, so assuming you downloaded and extracted the toolchain under /tmp/aarch64-none-linux-gnu-11.3.rel1
Then the toolchain file would be :
Toolchain.cmake
# targets
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)
set(triple aarch64-linux-gnu)
# misc settings
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
set(GNU_ROOT "/tmp/aarch64-none-linux-gnu-11.3.rel1")
set(CMAKE_SYSROOT "${GNU_ROOT}/aarch64-none-linux-gnu/libc")
# find paths
set(CMAKE_FIND_ROOT_PATH "${GNU_ROOT}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE BOTH)
# compiler settings
set(CMAKE_C_COMPILER "${GNU_ROOT}/bin/aarch64-none-linux-gnu-gcc" CACHE INTERNAL "")
set(CMAKE_CXX_COMPILER "${GNU_ROOT}/bin/aarch64-none-linux-gnu-g++" CACHE INTERNAL "")
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "${GNU_ROOT}/lib/gcc")
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "${GNU_ROOT}/lib/gcc")
# CPU tuning : the RPI 0 2W uses a Cortex a53
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=cortex-a53" CACHE STRING "")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=cortex-a53" CACHE STRING "")
# Qemu emulation setup
set(CMAKE_CROSSCOMPILING_EMULATOR "qemu-aarch64-static;-L;${CMAKE_SYSROOT}" CACHE FILEPATH "Path to the emulator for the target system.")
# Include settings
set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES
${GNU_ROOT}/aarch64-none-linux-gnu/include/c++/11.3.1
${GNU_ROOT}/aarch64-none-linux-gnu/libc/usr/include
${GNU_ROOT}/include
${GNU_ROOT}/aarch64-none-linux-gnu/include/c++/11.3.1/aarch64-none-linux-gnu
${GNU_ROOT}/lib/gcc/aarch64-none-linux-gnu/11.3.1/include
)
set(CMAKE_C_STANDARD_INCLUDE_DIRECTORIES
${GNU_ROOT}/aarch64-none-linux-gnu/libc/usr/include
)
Then, to actually reproduce the issue I found out that ArmCL is not even needed, the simplest cmake configuration I found to reproduce was :
git clone [email protected]:ARM-software/armnn.git && cd armnn
git checkout v23.05
cmake -B build -DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake -DBUILD_SHARED_LIBS=OFF .
cmake --build build -j"$(ncpus)" --config Release
(you can simply replace $(ncpus)
with the number of threads you want to use)
Hope this helps !
from armnn.
Hey maxmarsc,
Sorry for the delay on responding to this. Normally our preference in these situations is to split the functions off into their own .cpp file. However since this is only used in two places, and one of them is tests, just declaring them as inline is probably a simpler and easier solution. I'll add a patch for it later, but I wanted to ask some questions about how you're building this as we are not seeing the same errors on our end.
Are you including the Ref or OpenCL backends or is it just Neon?
I'm assuming this is cross compilation on an x86 system?
Are you using the build tool or compiling everything manually yourself? (https://github.com/ARM-software/armnn/blob/branches/armnn_23_05/build-tool/README.md)
from armnn.
https://review.mlplatform.org/c/ml/armnn/+/9867
from armnn.
Hello davmon,
No worries, things takes time. Thanks for the answer !
- I don't think I used either OpenCL or Ref, but ArmCL.
- Yes this is cross compilation on x86_64 host system, here is the exact toolchain I used
- I'm not using the build tool, but cmake directly as I needed to integrate armnn inside an existing cmake project, and I think it provied better integration and control (using CMake's ExternalProject feature). The only cmake flag I didn't mentioned in the issue was the
CMAKE_TOOLCHAIN_FILE
which I can provide if you want.
from armnn.
Yes, please send it on if you don't mind. I added a patch making them inline, which is linked in the comment above. But it would still be good to replicate it so we can close off any gaps in our testing. :)
from armnn.
Closing this off for now as a patch to fix the issue has been merged. If the issue reoccurs feel free to reopen the ticket. :)
from armnn.
Related Issues (20)
- CpuAcc and GpuAcc not working (but CpuRef is) HOT 14
- Remove the workaround for gcc.99578? HOT 1
- Compilation Terminated Issue HOT 1
- Linker Error HOT 3
- ETA for prebuilt binary for Android 14? HOT 9
- How Armnn deal with unsupport operator by armnn_delegate HOT 5
- How to use the profiling data to improve my inference HOT 3
- Building delegate using Docker does not copy delegate includes to output tar HOT 2
- UnitTests Failed ! After Build success HOT 2
- How to close optimization of graph or save optimized graph in dot/tflite format when I run test/executeNetwork and set --tflite-executor as delegate? Does armnn provide options? HOT 4
- Do you have armnn profiling analyze tool? HOT 2
- Gather operator dimension check error HOT 10
- Armnn insert reshape node before fullyconnected HOT 4
- I want config the gpu core number for armnn HOT 3
- Explicit padding for Transpose Convolution fails HOT 8
- opencv failed to call opencl HOT 1
- ScatterND not support HOT 3
- Building ARM NN via Docker approach with specific GLIBC , GLIBCXX versions ... HOT 3
- Gather(ND) dim error HOT 1
- Link error on older Android devices HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from armnn.