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

[CPU] Use Dnnl executor to avoid extra dnnl primitve desc query #16372

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

maxnick
Copy link
Contributor

@maxnick maxnick commented Mar 17, 2023

Details:

Since v3.1 it was observed that early inefficient dnnl::primitive_desc query became even slower. It was decided to store input, output and scratchpad memory descriptors in the DnnlExecutor to avoid dnnl::primitive_desc query calls at runtime.

Tickets:

  • 99126

@maxnick maxnick requested review from a team as code owners March 17, 2023 18:17
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Mar 17, 2023
@maxnick maxnick added this to the 2023.0 milestone Mar 17, 2023
@maxnick
Copy link
Contributor Author

maxnick commented Mar 20, 2023

@usstq , FIY

const dnnl::engine& engine) {
execPrim = dnnl::convolution_forward(pd);

const dnnl::engine& engine) : DnnlExecutor(pd) {
if (inMemDesc != pd.src_desc()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we change it to getSrcDesc() since pd.src_desc() is slow?
also pd.weights_desc() and pd.dst_desc() in following lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Changed accordingly. Thank you!

@maxnick
Copy link
Contributor Author

maxnick commented Mar 21, 2023

@dmitry-gorokhov , could you please review?

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

Successfully merging this pull request may close these issues.

3 participants