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

Does MNN supports intra_op_num_threads to configure number of physical cores? numThread is not helping in this. #2858

Closed
avinash31d opened this issue May 6, 2024 · 2 comments · Fixed by #2866

Comments

@avinash31d
Copy link
Contributor

平台(如果交叉编译请再附上交叉编译目标平台):

Platform(Include target platform as well if cross-compiling):

Github版本:

Github Version:

直接下载ZIP包请提供下载日期以及压缩包注释里的git版本(可通过7z l zip包路径命令并在输出信息中搜索Comment 获得,形如Comment = bc80b11110cd440aacdabbf59658d630527a7f2b)。 git clone请提供 git commit 第一行的commit id

Provide date (or better yet, git revision from the comment section of the zip. Obtainable using 7z l PATH/TO/ZIP and search for Comment in the output) if downloading source as zip,otherwise provide the first commit id from the output of git commit

编译方式:

Compiling Method

请在这里粘贴cmake参数或使用的cmake脚本路径以及完整输出
Paste cmake arguments or path of the build script used here as well as the full log of the cmake proess here or pastebin

编译日志:

Build Log:

粘贴在这里
Paste log here or pastebin
@avinash31d
Copy link
Contributor Author

Hi,
I am facing a strange issue, as soon as I integrate the mnn pymnn api with fastapi / flask server, it can only utilize a single physical cpu core at max. whereas in onnxruntime there is an option named intra_op_num_threads using which we can configure the number of physical core to be used. I tried numThread config while creating the session but it is not utilizing all the cores.

is there a way?

Thanks

@avinash31d
Copy link
Contributor Author

@jxt1234 I created a PR to build pymnn with OpenMP, as using OpenMP build resolves the issue when pymnn is used with fastapi / flask server.

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