You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to build a small footprint Onnx runtime cross compiled with toolchain arm-linux-gnueabihf-9.1.0-gcc/g++ just using required ops. Using my model.onnx I generated required_operators.config which has these ops -
updated the ONNX_CUSTOM_PROTOC_EXECUTABLE path with the extracted protoc
This worked fine in case of earlier complete cross-compilation. But it failed with --minimal_build extended
Even without --include_ops_by_config /path/to/equired_operators.config, I get the permission denied error
Tried providing permission with chmod +x , but did not work
Please help me resolve this issue. I can attach the full build log if required.
Urgency
I am tasked to deploy an onnx model in a very resource-constrained arm environment. Using a memory card, I tested the model with full onnx runtime libs and it executed as expected. But the libs all total required ~50 mb which is not available during deployment. But I am sure a lightweight runtime can be built for the reduced ops mentioned above.
"--cmake_extra_defines ONNX_CUSTOM_PROTOC_EXECUTABLE=/path/to/protoc-3.21.12" - This line should be
--cmake_extra_defines ONNX_CUSTOM_PROTOC_EXECUTABLE=/path/to/protoc-3.21.12/bin/protoc (path upto protoc executable)
Describe the issue
I am trying to build a small footprint Onnx runtime cross compiled with toolchain arm-linux-gnueabihf-9.1.0-gcc/g++ just using required ops. Using my model.onnx I generated required_operators.config which has these ops -
ai.onnx;17;Flatten,Gemm,LayerNormalization,Relu,Sigmoid
Including this file, I started a minimul build with the attached build script. But the build failed due to the following error -
I downloaded and used the protoc initially for cross-compiling full onnx runtime in the following way -
found the version of prtotobuf for linux86_64 from cmake/deps.txt
downloaded and extracted
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
updated the ONNX_CUSTOM_PROTOC_EXECUTABLE path with the extracted protoc
This worked fine in case of earlier complete cross-compilation. But it failed with --minimal_build extended
Even without --include_ops_by_config /path/to/equired_operators.config, I get the permission denied error
Tried providing permission with chmod +x , but did not work
Please help me resolve this issue. I can attach the full build log if required.
Urgency
I am tasked to deploy an onnx model in a very resource-constrained arm environment. Using a memory card, I tested the model with full onnx runtime libs and it executed as expected. But the libs all total required ~50 mb which is not available during deployment. But I am sure a lightweight runtime can be built for the reduced ops mentioned above.
Target platform
ARM
Build script
cd onnxruntime-v1.20.1
./build.sh
--config MinSizeRel
--arm
--parallel
--build_dir build-arm
--cmake_extra_defines CMAKE_TOOLCHAIN_FILE=/path/to/arm-linux-custom.cmake
--cmake_extra_defines ONNX_CUSTOM_PROTOC_EXECUTABLE=/path/to/protoc-3.21.12
--cmake_extra_defines onnxruntime_CROSS_COMPILING=ON
--skip_tests
--build_shared_lib
--minimal_build extended
--include_ops_by_config /path/to/required_operators.config \
Error / output
gmake[2]: /path/to/protoc-3.21.12: Permission denied
gmake[2]: *** [CMakeFiles/onnx_proto.dir/build.make:88: onnx/onnx-data.pb.h] Error 127
gmake[2]: *** Waiting for unfinished jobs....
Visual Studio Version
No response
GCC / Compiler Version
arm-linux-gnueabihf-9.1.0-gcc/g++
The text was updated successfully, but these errors were encountered: