-
Notifications
You must be signed in to change notification settings - Fork 738
feat: add Windows ARM64 (MSVC) build support #352
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,7 @@ | |
| _mm512_castps_si512(b))) | ||
| #endif // __AVX512DQ__ | ||
|
|
||
| #if defined(__ARM_NEON) && !defined(__aarch64__) | ||
| #if (defined(__ARM_NEON) || defined(_M_ARM64)) && !(defined(__aarch64__) || defined(_M_ARM64)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might need to simplify this here.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The logic involving _M_ARM64 feels a little bit confusing. |
||
| static inline float32_t vaddvq_f32(float32x4_t v) { | ||
| float32x2_t s = vadd_f32(vget_low_f32(v), vget_high_f32(v)); | ||
| return vget_lane_f32(vpadd_f32(s, s), 0); | ||
|
|
@@ -42,7 +42,7 @@ static inline int32_t vaddvq_s32(int32x4_t v) { | |
| } | ||
| #endif //__ARM_NEON && !__aarch64__ | ||
|
|
||
| #if defined(__aarch64__) | ||
| #if (defined(__aarch64__) || defined(_M_ARM64)) | ||
| #define ACCUM_FP32_2X1_NEON ACCUM_FP32_2X1_NEON_A64 | ||
| #else | ||
| #define ACCUM_FP32_2X1_NEON ACCUM_FP32_2X1_NEON_A32 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,8 @@ struct Norm1Matrix< | |
| } | ||
| }; | ||
|
|
||
| #if defined(__SSE__) || (defined(__ARM_NEON) && defined(__aarch64__)) | ||
| #if defined(__SSE__) || ((defined(__ARM_NEON) || defined(_M_ARM64)) && \ | ||
| (defined(__aarch64__) || defined(_M_ARM64))) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar here. |
||
| /*! L1-Norm Matrix (FP32, M=1) | ||
| */ | ||
| template <> | ||
|
|
@@ -129,6 +130,8 @@ struct Norm1Matrix<float, 1> { | |
| }; | ||
| #endif // __SSE__ || (__ARM_NEON && __aarch64__) | ||
|
|
||
| // MSVC ARM64 lacks `float16_t` without ARMv8.2 FP16; gate FP16 NEON | ||
| // specialization to gcc/clang aarch64. | ||
| #if (defined(__F16C__) && defined(__AVX__)) || \ | ||
| (defined(__ARM_NEON) && defined(__aarch64__)) | ||
| /*! L1-Norm Matrix (FP16, M=1) | ||
|
|
||
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.
Don't we need to consider
-marchoptimizations for MSVC on ARM64 here?