Skip to content

Small fix for supporting neon for dnn in Windows ARM64 #409

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 1 commit into
base: main
Choose a base branch
from

Conversation

shuanzhu
Copy link
Contributor

@shuanzhu shuanzhu commented Jul 2, 2025

To support neon for windows arm64 with MSVC, I add small fix here, please help review.

@shuanzhu shuanzhu changed the title Small fix for supporting neon for dnn in Windwos ARM64 Small fix for supporting neon for dnn in Windows ARM64 Jul 2, 2025
@@ -402,11 +402,17 @@ static inline void cgemv8x4(float *_out, const opus_int8 *w, const float *scale,
for (;j<cols-4;j+=8)
{
int8x16_t vw0, vw1, vw2, vw3, vx0, vx1;
#if defined(_MSC_VER) && defined(_M_ARM64)
vx0 = vreinterpretq_s8_s32(vld1q_dup_s32((int*)(void*)&x[j]));
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for making the use of vreinterpretq_s8_s32() conditional to Windows (as opposed to all the time)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it should use vreinterpretq_s8_s32 all the time no matter what platform it is, I didn't notice that vreinterpretq_s8_s32 was already defined in <arm_neon.h>. I thought it was only in <arm64_neon.h>. Thanks for the reminder. I have modified the code accordingly, please help review.

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.

2 participants