microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
13.47k stars 2.75k forks source link

[Build] cross-compiling onnxruntime for arm32 and onnxruntime_ENABLE_CPUINFO not working. #20461

Open lsjws2008 opened 2 months ago

lsjws2008 commented 2 months ago

Describe the issue

I tried to cross-compile onnxruntime for arm32 development board on Ubuntu 20.04. I followed the cross-compilation guide provided by . It might be that onnx does not support arm's cpuinfo, so I set onnxruntime_ENABLE_CPUINFO=OFF. However, it seems that this setting doesn't work.

Urgency

Normal

Target platform

Arm32

Build script

./build.sh --config RelWithDebInfo --update --build --build_shared_lib --parallel --skip_submodule_sync --cmake_extra_defines CMAKE_TOOLCHAIN_FILE=/home/ubuntu/onnxruntime/cmake/tool.cmake Protobuf_LIBRARIES=/usr/local/lib/libprotobuf.a Protobuf_INCLUDE_DIR=/usr/local/include/ onnxruntime_ENABLE_CPUINFO=OFF protobuf_BUILD_SHARED_LIBS=OFF ONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/local/bin/protoc CMAKE_OSX_ARCHITECTURES=arm

Error / output

image image

Visual Studio Version

1.13.1

GCC / Compiler Version

8.3.0

snnn commented 2 months ago

Our CI build runs it . So it should work fine: https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/github/azure-pipelines/linux-ci-pipeline.yml

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

snnn commented 1 month ago

CMAKE_OSX_ARCHITECTURES is not needed for Linux build. It is for Apple's operating systems.