1 #include "caffe2/core/types.h" 2 #include "caffe2/perfkernels/cvtsh_ss_bugfix.h" 3 #include "caffe2/perfkernels/typed_axpy.h" 4 #include "caffe2/utils/math.h" 11 void TypedAxpy_float16_float__avx_f16c(
18 while (N && (
unsigned long)x % 16) {
19 *(y++) += _cvtsh_ss((*(x++)).x) * a;
25 __m256 mma = _mm256_set1_ps(a);
27 const int bound = (N % 8) ? N - 8 : N;
29 for (; current < bound; current += 8) {
31 _mm_loadu_si128(reinterpret_cast<const __m128i*>(x + current));
32 __m256 mmx_32 = _mm256_cvtph_ps(mmx_16);
33 __m256 mmy_in = _mm256_loadu_ps(y + current);
34 __m256 mmmul = _mm256_mul_ps(mmx_32, mma);
35 __m256 mmy_out = _mm256_add_ps(mmmul, mmy_in);
36 _mm256_storeu_ps(y + current, mmy_out);
41 y[current] += _cvtsh_ss(x[current].x) * a;
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...