-
Notifications
You must be signed in to change notification settings - Fork 432
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
[WIP] Enable MSVC build #238
Conversation
Current build errors:
Explanation: |
@@ -88,7 +89,13 @@ PackedDepthWiseConvMatrix::PackedDepthWiseConvMatrix( | |||
// (12, 8), (12, 9), (12, 10), zero, ..., (15, 8), (15, 9), (15, 10), zero | |||
// (28, 8), (28, 9), (28, 10), zero, ..., (31, 8), (31, 9), (31, 10), zero | |||
for (int k1 = 0; k1 < K; k1 += 32) { | |||
#ifdef _MSC_VER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fbgemmAlignedAlloc and fbgemmAlignedFree should take care of it
@@ -131,7 +131,7 @@ FBGEMM_API std::int64_t | |||
SaturatingRoundingMulWithShift(std::int32_t a, std::int32_t b, int right_shift); | |||
|
|||
template <typename T> | |||
FBGEMM_API T Requantize( | |||
T Requantize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are needed for shared library build on Linux. What problems do they create on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are not needed because:
- They are the in the header file so they will be visible at the user side.
- They have the implementation, not just declarations.
The current plan is to not have assembly version for windows. We will add a C/C++ only inefficient version for now. Eventually the inline assembly will go away for gcc as well as MSVC as we move to runtime code generation for fp16 GEMMs. |
I have another solution which replaces each asm line to intrinsic APIs line by line. I know this is not the best solution and jit might be a better solution, eventually. But, this works just fine without losing performance on both Linux and windows before the jit code coming. |
@ykim362 So are you interested in creating a new PR or getting the essential changes in this PR? |
@peterjc123 I've been working on AVX512 fp16 kernels. I will submit a PR soon. Thanks for bringing this up. |
@peterjc123 Thanks for your contributions. I have incorporated your changes into the following PRs with minor modifications. These PRs also take care of inline assembly by excluding it for MSVC and redirecting the kernel calls to slower reference implementation. The PRs take care of the build for the core library. We still need to make sure it runs fine as well. |
@dskhudia Great work! What about introducing a Windows CI with the build-only job that shows the current status of the work towards Windows? If you meet trouble doing it using CircleCI, I can help. |
Thanks. @shz0116 is working on adding a windows build-only job using github Actions. If we face issues with setting it up with github Actions, we will appreciate your help in doing it using CircleCI. |
Summary: Pull Request resolved: pytorch#241 For pytorch#150 Some changes picked from with minor modifications pytorch#238 . Thanks a lot for your contributions. Reviewed By: jspark1105 Differential Revision: D19331181 fbshipit-source-id: 08dd3a8ffd65f781e3bda8d241b9eb0221f03669
Fixes #150.
Worklist:
FBGEMM_API
_aligned_malloc
and_aligned_free