-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
设置单线程不生效 / API依赖onnxruntime / onnxruntime新版本头文件不匹配 #31
Comments
代码合并了一些pr,但没有编译发布新版,暂时只能由使用者自行编译。
想使用哪个版本的onnxruntime可以去Microsoft的官方仓库下载,或者我的另一个仓库:https://github.com/RapidAI/OnnxruntimeBuilder |
|
分成两个涉及破坏性更新,不过这个项目已不再频繁开发,可能也不会有什么问题。 官方文档有提到最好让操作系统处理线程分配,所以原来没有把intra的配置也考虑进去。 但既然确实有用,那么综合来说,原来的inter仍然用setNumThread,而新的intra可以考虑另起一个方法去配置,未配置时由操作系统分配即可。 |
三个问题
对于第一个问题,经过查看代码,发现在三处setNumThread函数中添加一行
就可以单线程执行。不知道这样修改和不合适。
对于第三个问题,猜测应该是onnxruntime版本的问题,似乎API已经变了很长时间了,是否应该以新版本为准?或者通过宏定义来区分。
对于第二个问题,我使用language server快速将OcrLite修改为OcrLiteImpl,然后将OcrLite.h和OcrLite.cpp修改为OcrLiteImpl.h和OcrLiteImpl.cpp,头文件防重复的宏定义也对应修改,再添加OcrLite.h和OcrLite.cpp,进行封装,经测试没有什么问题,使用的时候不依赖onnxruntime了。
The text was updated successfully, but these errors were encountered: