google / gemmlowp

Low-precision matrix multiplication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does avx2 feature of gemmlowp support gcc4.8.5?

Qoboty opened this issue · comments

when I want to use gemmlowp of AVX2, I add GEMMLOWP_ENABLE_AVX2 as #122 said, However I got error as below:

"internal/pack_avx.h:83:51: error: there are no arguments to ‘_mm256_set_m128i’ that depend on a template parameter, so a declaration of ‘_mm256_set_m128i’ must be available"

My gcc is gcc4.8.5, Does gcc not support ‘_mm256_set_m128i’?, If I want to used gemmlowp AVX2 feature under gcc, what I should do ? Thank you !

Looks like others have run into this missing intrinsic on GCC.
https://stackoverflow.com/questions/32630458/setting-m256i-to-the-value-of-two-m128i-values

If you can make a fix for gemmlowp (implementing it where it's missing based on #if's) please make a Pull Request.

yes, when I use
#define _mm256_set_m128i(v0, v1) _mm256_insertf128_si256(_mm256_castsi128_si256(v1), (v0), 1)
the error up has gone, but I got another error as below:

./internal/kernel_avx.h: In member function ‘virtual void gemmlowp::AVX2_64_Kernel24x8Depth2::Run(int32_t*, std::size_t, std::size_t, const     uint8_t*, const uint8_t*, std::size_t, std::size_t) const’:
../internal/kernel_avx.h:354:24: error: unknown register name ‘%ymm15’ in ‘asm’
          "%r13", "%r14");
                        ^
 ./internal/kernel_avx.h:354:24: error: unknown register name ‘%ymm14’ in ‘asm’
 ../internal/kernel_avx.h:354:24: error: unknown register name ‘%ymm13’ in ‘asm’
 ../internal/kernel_avx.h:354:24: error: unknown register name ‘%ymm12’ in ‘asm’

It sounds that gcc<5 does not support register YMM?
https://stackoverflow.com/questions/45358434/suppressing-avx-inline-assembly-errors-with-gcc-5

Hah, sounds like it. Or at least 4.9 according to Michael Petch 's answer there.

Yes, when I update my gcc to 4.9.3. I got no error any more. Thanks!