Skip to content

Export oneDNN API graph compiler functions #68

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

Merged
merged 3 commits into from
May 14, 2024

Conversation

AndreyPavlenko
Copy link
Contributor

No description provided.

@AndreyPavlenko AndreyPavlenko requested a review from dchigarev May 13, 2024 20:17
#include <memory>
#include <new>
#include <string_view>

#ifndef DNNL_HELPER_DLL_EXPORT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DNNL_HELPER_DLL_EXPORT may not necessarily be provided by dnnl_graph_compiler.h, let's either explicitly include dnnl_config.h or better yet, define our own macros so we would depend on oneDNN less

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dnnl_graph_compiler.h uses dnnl_status_t in the function definitions. It's declared in dnnl_common_types.h, that also includes dnnl_config.h. Thus, DNNL_HELPER_DLL_EXPORT should always be declared in this context. I've also added the check on the line 25.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thus, DNNL_HELPER_DLL_EXPORT should always be declared in this context.

It's true for now, however, there was an idea not long ago to get rid of oneDNN-related types in GC API (including dnnl_status_t) which will lead to that dnnl_graph_compiler.h will no longer include dnnl_types.h. So why wouldn't we secure ourselves and define the macros on our own on the GC side?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Defined the GC_DLL_EXPORT macros.

@AndreyPavlenko AndreyPavlenko merged commit e0d4b65 into intel:main May 14, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants