This directory contains a few C/C++ sample applications for demoing onnxruntime usage:
You may get a precompiled libpng library from https://onnxruntimetestdata.blob.core.windows.net/models/libpng.zip
You may either get a prebuit onnxruntime from nuget.org, or build it from source by following the BUILD.md document. If you build it by yourself, you must append the "--build_shared_lib" flag to your build command. Like:
build.bat --config RelWithDebInfo --build_shared_lib --parallel
When the build is done, run Visual Studio as administrator and open the onnxruntime.sln file in your build directory.
When the solution is loaded, change the build configuration to "RelWithDebInfo"(which must match your previous build command), then select the "INSTALL" project, and build it. It will install your onnxruntime to "C:\Program Files (x86)\onnxruntime"
Open cmd.exe, change your current directory to samples\c_cxx, then run
mkdir build
cmake .. -A x64 -T host=x64 -DLIBPNG_ROOTDIR=C:\path\to\your\libpng\binary
You may omit the "-DLIBPNG_ROOTDIR=..." argument if you don't have the libpng library.
You may append "-Donnxruntime_USE_CUDA=ON" to the last command args if your onnxruntime binary was built with CUDA support.
Then you can open the onnxruntime_samples.sln file in the "build" directory and build the solution.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。