admin管理员组文章数量:1590503
目录
1 下载onnx
2 编译
3 后来编译onnxruntime v1.10.1时候遇到的错误
4 编译onnxruntime v1.8.0
1 下载onnx
git clone https://github/microsoft/onnxruntime
cd onnxruntime
git submodule update --init --recursive
2 编译
由于是交叉编译,所以需要设置一下编译工具,在网上搜索看到了这个
chineseocr_lite/build-onnxruntime-android.sh at onnx · DayBreak-u/chineseocr_lite · GitHub
于是 我用下面的命令进行编译
./build.sh --skip_tests --config Release --build_shared_lib --cmake_extra_defines CMAKE_C_COMPILER=arm-ca9-linux-gnueabihf-gcc CMAKE_CXX_COMPILER=arm-ca9-linux-gnueabihf-g++ --parallel 10
这里就不用写-DCMAKE_C_COMPILER=arm-ca9-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-ca9-linux-gnueabihf-g++了,直接写CMAKE_C_COMPILER=arm-ca9-linux-gnueabihf-gcc CMAKE_CXX_COMPILER=arm-ca9-linux-gnueabihf-g++即可。
然后编译提示下面的错误,
我某搜索引擎搜了一下这个报错
/bin/sh: 1: ../protobuf/cmake/protoc-3.11.3.0: Exec format error
得到如下答案,
然后点击链接去了https://github/ucb-bar/onnxruntime-riscv/issues/7
可以看到
然后继续去链接 onnxrun
本文标签: 源码版本UbuntuonnxruntimeCPU
版权声明:本文标题:ubuntu交叉编译onnxruntime源码_cpu版本 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1728085122a1144881.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论