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

config. SetMkldnnCacheCapacity is useless #33021

Closed
juncaipeng opened this issue May 20, 2021 · 8 comments
Closed

config. SetMkldnnCacheCapacity is useless #33021

juncaipeng opened this issue May 20, 2021 · 8 comments
Assignees
Labels

Comments

@juncaipeng
Copy link
Contributor

Ubuntu
C++
MKLDNN

Download the demo (Link:https://dubox.com/s/1RVo80hVAC0zr5iZ2EuG0xQ Password:3v5m ) and refer to the readme.

@paddle-bot-old
Copy link

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@lidanqing-intel
Copy link
Contributor

Reproduced

@lidanqing-intel
Copy link
Contributor

lidanqing-intel commented May 23, 2021

I just tested again, From #32664 there are memory leak @jczaja Please fix this issue, thank you very much!

@jczaja
Copy link
Contributor

jczaja commented May 27, 2021

@luotao1 ,
While working on this issue I had remove(#33174, still testing) some code you added at #18580 . My question is do you remember why restoring oneDNN caching was needed as done here:

paddle::platform::MKLDNNDeviceContext::tls().set_cur_mkldnn_session_id(
platform::MKLDNNDeviceContextThreadLocals::kMKLDNNSessionID_Default);
platform::MKLDNNDeviceContext::tls().set_cur_input_shape_cache_capacity(0);
platform::MKLDNNDeviceContext::tls().set_cur_input_shape_str("");

@luotao1
Copy link
Contributor

luotao1 commented May 28, 2021

I remember it is used to fix a detect model #18081 (comment) which input dims are dynamic, the model is in paddle/fluid/inference/tests/api/analyzer_detect_tester.cc

config. SetMkldnnCacheCapacity is used to balance the memory and speed. You can see the following data from the detect model. (#18372)

speed(ms) memory CacheCapacity
26.1437 1.5G CacheCapacity=10
24.0129 3.5G CacheCapacity=50

@jczaja
Copy link
Contributor

jczaja commented Jun 1, 2021

@juncaipeng Just to post status of work on that one. There are at least three sources of memory leaks. We understand two of them. Fix to first one is #33174.

jczaja added a commit to jczaja/Paddle that referenced this issue Jun 1, 2021
- compilation fix

- Fix

- Lint
juncaipeng pushed a commit that referenced this issue Jun 9, 2021
jczaja added a commit that referenced this issue Jun 11, 2021
* - Second fix

- fix

* - fix
@jczaja
Copy link
Contributor

jczaja commented Jun 11, 2021

@juncaipeng Two PRs with fixes to this issue were merged. Please test.

@lidanqing-intel
Copy link
Contributor

@OliverLPH Hi I talked with Juncai, please test this issue, since two PRs are merged and should fix this.

lidanqing-intel pushed a commit to lidanqing-intel/Paddle that referenced this issue Jun 15, 2021
lidanqing-intel pushed a commit to lidanqing-intel/Paddle that referenced this issue Jun 15, 2021
Superjomn pushed a commit that referenced this issue Jun 16, 2021
…y consumption (#33571)

* [oneDNN] First fix to #33021  (#33174)

* - First fix to #33021

* [oneDNN] Second fix to #33021 (#33471)

* use older download_data function

Co-authored-by: Jacek Czaja <jacek.czaja@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants