Skip to content

Support simpleomp on Windows with MSVC #5683

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

Jiang-Weibo
Copy link
Contributor

  1. Modify the CMakeLists.txt on the top level to leverage openmp on MSVC
  2. Support simpleomp on MSVC
  3. Test the results using the existed tests folder

@github-actions github-actions bot added the core label Sep 5, 2024
@tencent-adm
Copy link
Member

tencent-adm commented Sep 5, 2024

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ Jiang-Weibo
✅ nihui
❌ s2496214


s2496214 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link

codecov-commenter commented Sep 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.42%. Comparing base (8363040) to head (d400fd9).
Report is 3 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5683       +/-   ##
===========================================
- Coverage   95.16%   94.42%    -0.75%     
===========================================
  Files         743      464      -279     
  Lines      252233   133625   -118608     
===========================================
- Hits       240043   126175   -113868     
+ Misses      12190     7450     -4740     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jiang-Weibo Jiang-Weibo closed this Sep 7, 2024
@Jiang-Weibo Jiang-Weibo reopened this Sep 7, 2024
@Jiang-Weibo Jiang-Weibo closed this Sep 8, 2024
@Jiang-Weibo Jiang-Weibo reopened this Sep 8, 2024
@Jiang-Weibo Jiang-Weibo changed the title [WIP]Support simpleomp on Windows with MSVC Support simpleomp on Windows with MSVC Sep 11, 2024
Copy link

The binary size change of libncnn.so (bytes)

architecture base size pr size difference
x86_64 16465128 16465128 0 😘
armhf 7335212 7335212 0 😘
aarch64 10704240 10704240 0 😘

@nihui nihui requested a review from Copilot April 18, 2025 03:17
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables support for simpleomp on Windows with MSVC by adding Windows-specific branches in the source code and updating the CMake and GitHub Actions workflow files to configure and test the MSVC build.

  • Introduces _WIN32-specific typedefs, initialization, and task dispatch code in src/simpleomp.cpp.
  • Adds new build and test steps in the Windows workflow to compile and run the simpleomp configuration.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/simpleomp.cpp Adds Windows/MSVC branches for OpenMP support and task dispatch.
.github/workflows/windows.yml Introduces build and test steps for the x64-simpleomp configuration.
Files not reviewed (1)
  • src/CMakeLists.txt: Language not supported

@whyb
Copy link
Contributor

whyb commented Apr 18, 2025

Hello @Jiang-Weibo ,

Thank you very much for your outstanding contribution to simpleomp.cpp! Your modifications have given me new insights into optimization, and I have also tried applying the changes from your PR to my project as a test case. The relevant code can be found here. If you have some time, could you take a look and see if there is room for improvement? Your professional insights would be incredibly valuable to me.

Once again, I really appreciate your great work, and I look forward to seeing more of your contributions in the community!

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

Successfully merging this pull request may close these issues.

5 participants