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

compiler.h changes for Windows MSVC support #6623

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

tarun292
Copy link
Contributor

@tarun292 tarun292 commented Nov 3, 2024

Differential Revision: D65328573

Copy link

pytorch-bot bot commented Nov 3, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/6623

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 0677a48 with merge base 8a4e492 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 3, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 3, 2024
Summary: Pull Request resolved: #6623

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 3, 2024
Summary: Pull Request resolved: #6623

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 3, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

@@ -148,7 +148,7 @@ static Kernel prim_ops[] = {
EValue& out = *stack[2];
if (a.isInt() && b.isInt()) {
const int64_t quot = a.toInt() / b.toInt();
if (std::signbit(a.toInt()) == std::signbit(b.toInt())) {
if ((a.toInt() < 0) == (b.toInt() < 0)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This feels unrelated to PR in question, is it?

facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
facebook-github-bot pushed a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 4, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D65328573

tarun292 added a commit that referenced this pull request Nov 5, 2024
Summary:
Adding some MSVC (Windows) specific macros to compiler.h to make sure we can build with MSVC.



Reviewed By: dbort

Differential Revision: D65328573
@facebook-github-bot facebook-github-bot merged commit 11d1742 into main Nov 5, 2024
39 of 41 checks passed
@facebook-github-bot facebook-github-bot deleted the export-D65328573 branch November 5, 2024 07:55
// There currently doesn't seem to be a great way to do this in Windows and
// given that weak linkage is not really critical on Windows, we'll just leave
// it as a stub.
#define ET_WEAK

Choose a reason for hiding this comment

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

Hi, we are adding Windows x64 Build Support #6979. I use .\install_requirements.bat --pybind xnnpack to build on windows. And we encountered duplicate symbol problem.
image
I investigated and found that windows didn't support weak symbol. Do you have some insights how to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants