首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Linux上为onnxruntime生成C API

如何在Linux上为onnxruntime生成C API
EN

Stack Overflow用户
提问于 2020-06-28 10:38:51
回答 1查看 699关注 0票数 1

我正在尝试在Linux上从源代码构建onnxruntime。根据这个instruction,我已经成功地构建了python轮子和共享库。但是我还没有看到C API的头文件。

有一个构建选项--build_csharp,它似乎可以启用C#/C包。我试图添加此选项,但得到以下错误。

代码语言:javascript
复制
CMake Warning at CMakeLists.txt:137 (message):
Language Csharp is not found in the system

我安装了dotnet-sdk-3.1,但仍然收到这个错误。我能问一下如何在Linux上正确地生成onnxruntime C API吗?谢谢!

EN

回答 1

Stack Overflow用户

发布于 2020-11-11 17:12:23

请尝试以下步骤:

代码语言:javascript
复制
- Steps to build ONNX from source code:
1. git clone --recursive https://github.com/Microsoft/onnxruntime
2. Get the commit ID of the version you want to build (In case you want older version)
3. git checkout "your commitID"
4. Install the required version of Cmake on your system
6. Run: <path>\build.sh --config Release --build_shared_lib --parallel
7. A build folder will be created in the onnxruntime.
5. Get the onnxruntime.dll from the dir: \onnxruntime\build\Windows\Release\Release
6. Get the required headers (onnxruntime_c_api.h, onnxruntime_cxx_api.h, onnxruntime_cxx_inline.h)
from the dir: \onnxruntime\include\onnxruntime\core\session and put it in the unit location.
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62617626

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档