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

ncnn: Allow configuring multithreading #2342

Merged
merged 5 commits into from Nov 28, 2023

Conversation

JeremyRand
Copy link
Contributor

Informal test results of tweaking these settings on my POWER9 system:

  • 31 threads, 20ms block time (ncnn default): 43% CPU usage, 60s to upscale.
  • 4 threads, 20ms block time: 9% CPU usage, 72s to upscale.
  • 31 threads, 0ms block time: 24% CPU usage, 57s to upscale. (The 3s improvement is within margin of error, I don't think it actually resulted in a speedup, it's just a CPU usage improvement with no significant effect on performance on my system.)

@JeremyRand
Copy link
Contributor Author

I know you guys are busy with the iterator rewrite, so feel free to take your time on reviewing this.

Copy link
Member

@RunDevelopment RunDevelopment left a comment

Choose a reason for hiding this comment

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

Code looks good, but I can't judge whether these changes make sense since I have no idea about NCNN.

@joeyballentine Could you please take a look at this?

@joeyballentine
Copy link
Member

It only affects CPU mode which (afaik) is only used by Jeremy so I think it's fine

@joeyballentine joeyballentine merged commit 2128fc7 into chaiNNer-org:main Nov 28, 2023
14 checks passed
@JeremyRand JeremyRand deleted the ncnn-threads branch November 28, 2023 15:56
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

Successfully merging this pull request may close these issues.

None yet

3 participants