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

rfcs: graph api: propose ocl runtime support #1821

Open
wants to merge 2 commits into
base: rfcs
Choose a base branch
from

Conversation

TaoLv
Copy link
Contributor

@TaoLv TaoLv commented Mar 6, 2024

This is to propose adding OpenCL GPU runtime support in oneDNN Graph API.

It addresses the API limitations mentioned RFC #1745 and also paves the way for OpenVINO integration.

@TaoLv TaoLv added the RFC A design document label Mar 6, 2024
API.
- oneDNN OpenCL interop API supports creating engine from a cache blob. This is
not considered in this RFC as the requirement and use scenario for graph API
is not clear at this moment.

Choose a reason for hiding this comment

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

Creating engine from a cache is added to reduce the engine creation time. Otherwise, we had several hundred milliseconds additional overhead. OV expects engine creation for graph api to be fast, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment, @isanghao . This limitation is removed in the second commit.

- Primitive selection (`DNNL_ENABLE_PRIMITIVE`) and workload selection
(`DNNL_ENABLE_WORKLOAD`) are not supported by Graph API as before. We mention
them here as the features were initially requested by OpenVINO for primitive
API.

Choose a reason for hiding this comment

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

What about the binary size impact of enabling graph api? This configs are added because we are constantly pushed for smaller binary size.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For dynamic library, enabling Graph API (-DONEDNN_BUILD_GRAPH=ON) increases ~4MB to the binary size. It's almost constant over different CPU/GPU runtime combinations as the implementation code is general.

For example, a typical default build (CPU_RUNTIME=OMP/GPU_RUNTIME=NONE) with GCC 11.4 on my Ubuntu machine. The binary size of libdnnl.so is increased from 59710128 Bytes to 64126976 Bytes with Graph API enabled.

@TaoLv TaoLv force-pushed the lvtao/rfc/graph-ocl branch 2 times, most recently from 9c98df6 to fc2e31d Compare March 25, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC A design document
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants