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

子线程推理的环境下,开启OpenMP存在内存泄漏,定位到是在ncnn::copy_make_border处产生的 #5865

Open
hchen2862 opened this issue Jan 2, 2025 · 1 comment

Comments

@hchen2862
Copy link

hchen2862 commented Jan 2, 2025

开启OpenMP:
image

关闭OpenMP:
image

Tasks

Preview Give feedback
No tasks being tracked yet.
@hchen2862 hchen2862 changed the title 子线程推理下,开启OpenMP存在内存泄漏,定位到是在ncnn::copy_make_border处产生的 子线程推理的环境下,开启OpenMP存在内存泄漏,定位到是在ncnn::copy_make_border处产生的 Jan 2, 2025
@nihui
Copy link
Member

nihui commented Jan 2, 2025

每个用户态的子线程,比如 pthread std::thread,都会自动创建一个子线程作用域内的 openmp 线程池,这是 libgomp / libomp 内部控制的,这个线程池不会立即释放

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

No branches or pull requests

2 participants