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

[oneDNN ] disabling more ops caching #34830

Merged
merged 3 commits into from
Aug 17, 2021

Conversation

jczaja
Copy link
Contributor

@jczaja jczaja commented Aug 11, 2021

PR types

Bug fixes

PR changes

OPs

Describe

Recently oneDNN introduced caching of its elements: primitives and primitives descriptors so we can disable partially our own caching. This PR disabled caching of LRN, Transpose, Layer Norm and Sum oneDNN ops

jczaja added 2 commits August 11, 2021 17:02
- fix in compilation

- compilation fix

- transpose caching disabled

- compilation fix

- more compilation fixes

- sum caching disabled

- compilation fix
@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@jczaja jczaja requested a review from jakpiase August 16, 2021 12:32
this->dev_ctx_.SetBlob(key_pd, this->fwd_pd_);
}
this->fwd_pd_.reset(
new dnnl::sum::primitive_desc(dst_md, scales, srcs_md, this->engine_));
Copy link
Contributor

Choose a reason for hiding this comment

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

You are using "new" here. Is it later destroyed anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this->fwd_pd_ is a shared pointer so when reference count will get to zero then deallocation of of object will happen . So we do not have to worry about memory leaks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, thanks. I didn't see that it is a smart pointer

@jakpiase jakpiase self-requested a review August 16, 2021 14:45
Copy link
Contributor

@jakpiase jakpiase left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@lidanqing-intel lidanqing-intel left a comment

Choose a reason for hiding this comment

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

LGTM.

@jczaja jczaja merged commit f1c1d9e into PaddlePaddle:develop Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants