Skip to content
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

Official c api build dll and lib do not include function of OrtGetDimensions #1550

Closed
qw2208 opened this issue Aug 2, 2019 · 9 comments
Closed
Assignees

Comments

@qw2208
Copy link

qw2208 commented Aug 2, 2019

Describe the bug
The official build of c lib and dll do not have ortgetdimensions. I do not find the function after running dumpbin.exe onnxruntime.lib. Is the official build correct? Or if I have to use capi, I have to build by myself?

@snnn
Copy link
Member

snnn commented Aug 2, 2019

Please check https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/core/providers/cpu/symbols.txt

Is the symbol there? If not, it's a bug

@qw2208
Copy link
Author

qw2208 commented Aug 2, 2019

I just downloaded the zip package from link. Run the command: dumpbin.exe /EXPORTS (Path)\onnxruntime.lib.

Got the following results:
WeChat Screenshot_20190802133558

Seems it does NOT have the function of OrtGetDimensionsCount, which differs from your link.
Missing OrtGetDimensionsCount.

@snnn
Copy link
Member

snnn commented Aug 2, 2019

@qw2208
Copy link
Author

qw2208 commented Aug 2, 2019

Then the link from the main page is not the newest. Thanks.

@qw2208 qw2208 closed this as completed Aug 2, 2019
@hoaquocphan
Copy link

Hello All,
CC @qw2208 @snnn
currently I have the same issue as you.

my_code.cpp:220:3: error: 'OrtCreateEnv' was not declared in this scope OrtCreateEnv(ORT_LOGGING_LEVEL_WARNING, "test", &env); ^~~~~~~~~~~~ my_code.cpp:220:3: note: suggested alternative: 'OrtEnv' OrtCreateEnv(ORT_LOGGING_LEVEL_WARNING, "test", &env); ^~~~~~~~~~~~ OrtEnv my_code.cpp:224:37: error: 'OrtCreateSessionOptions' was not declared in this scope OrtSessionOptions* session_options=OrtCreateSessionOptions();
source code info:

So anyone know this issue, Please help me.

Thanks all.

@snnn
Copy link
Member

snnn commented Feb 24, 2020

The API was changed. Please refer #3050 as an example of how to update your existing code.

@hoaquocphan
Copy link

Hi @snnn

Thank you very much for your support,
I can fix many issue such as OrtGetErrorMessage => g_ort->GetErrorMessage
But there are some function/struct related to Allocator doesn't have the alternative:

OrtSetSessionThreadPoolSize
OrtCreateDefaultAllocator
OrtReleaseAllocator
OrtAllocatorInfo
OrtCreateCpuAllocatorInfo
OrtReleaseAllocatorInfo

So could you please help me for this remain issue.
Thank again.

@snnn
Copy link
Member

snnn commented Feb 24, 2020

OrtCreateDefaultAllocator -> GetAllocatorWithDefaultOptions
OrtSetSessionThreadPoolSize -> SetIntraOpNumThreads and SetInterOpNumThreads

@hoaquocphan
Copy link

Hi @snnn

Thank you very much for your support.
I fixed all these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants