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

[x86] Depthwise conv2d #6745

Merged
merged 14 commits into from
Sep 10, 2021
9 changes: 9 additions & 0 deletions lite/backends/x86/math/avx/avx_mathfuns.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ void sincos256_ps(v8sf x, v8sf *s, v8sf *c);
// FMA support
#ifndef __AVX2__
#define _mm256_fmadd_ps(a, b, c) _mm256_add_ps(c, _mm256_mul_ps(a, b))
#define _mm256_permutevar8x32_ps(a, b) \
_mm256_setr_ps(*((float *)(&a) + *((int *)(&b))), \
*((float *)(&a) + *((int *)(&b) + 1)), \
*((float *)(&a) + *((int *)(&b) + 2)), \
*((float *)(&a) + *((int *)(&b) + 3)), \
*((float *)(&a) + *((int *)(&b) + 4)), \
*((float *)(&a) + *((int *)(&b) + 5)), \
*((float *)(&a) + *((int *)(&b) + 6)), \
*((float *)(&a) + *((int *)(&b) + 7)))
#endif

} // namespace math
Expand Down
Loading