Skip to content

Conversation

timminator
Copy link
Contributor

Currently the mkldnn cache is unlimited and not configurable via a config setting. This results in memory leaks when using for example PaddleOCR on a lot of images.
This PR makes this option configurable for tools like PaddleOCR to set a reasonable cache capacity.

Fixes PaddlePaddle/PaddleOCR#15631

Copy link

paddle-bot bot commented Jun 8, 2025

Thanks for your contribution!

@Bobholamovic
Copy link
Member

Hi, please set the develop branch as the target branch. The updates should be merged into develop, before cherry-picked to the release branch.

@Bobholamovic Bobholamovic changed the base branch from release/3.0 to develop June 9, 2025 07:36
@Bobholamovic Bobholamovic changed the base branch from develop to release/3.0 June 9, 2025 07:37
TingquanGao
TingquanGao previously approved these changes Jun 9, 2025
@timminator timminator changed the base branch from release/3.0 to develop June 9, 2025 08:24
@timminator timminator dismissed TingquanGao’s stale review June 9, 2025 08:24

The base branch was changed.

@timminator timminator changed the base branch from develop to release/3.0 June 9, 2025 08:25
@timminator timminator changed the base branch from release/3.0 to develop June 9, 2025 09:18
@timminator
Copy link
Contributor Author

Switching to develop as the target was more difficult then expected. ;-)
@Bobholamovic You made also changes to the file in the meantime, but everything should be good now. @TingquanGao I will rerequest a review from you due to switching the target branch.

@timminator timminator requested a review from TingquanGao June 9, 2025 09:21
@Bobholamovic Bobholamovic merged commit 60ae2f5 into PaddlePaddle:develop Jun 9, 2025
6 checks passed
Bobholamovic pushed a commit that referenced this pull request Jun 10, 2025
* Fix memory leak when enabling mkldnn

Fix PaddlePaddle/PaddleOCR#15631

* Set default cache capacity to 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak when using PaddleOCR 3.0.1/3.0.0 with argument device=cpu
3 participants