Opened 7 weeks ago

Last modified 3 weeks ago

#620 new defect

MSYS2/MinGW/GCC9: InterpolationFilter_avx.cpp: x86 compile trying to use x86-64 intrinsics

Reported by: ligh_de Owned by:
Priority: blocker Milestone: VTM-6.2
Component: VTM Version: VTM-6.2
Keywords: x86 assembler build Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

CFLAGS: -mthreads -mtune=generic -O2 -pipe
LDFLAGS: -pipe -static-libgcc -static-libstdc++

[6/141] Building CXX object source/Lib/CommonAnalyserLib/CMakeFiles/CommonAnalyserLib.dir/__/CommonLib/x86/avx/InterpolationFilter_avx.cpp.o
FAILED: source/Lib/CommonAnalyserLib/CMakeFiles/CommonAnalyserLib.dir/__/CommonLib/x86/avx/InterpolationFilter_avx.cpp.o 
E:\MABS\local32\bin\g++.bat  -DENABLE_SPLIT_PARALLELISM=0 -DRExt__DECODER_DEBUG_BIT_STATISTICS=1 -DRExt__DECODER_DEBUG_TOOL_STATISTICS=1 -DUSE_AVX -I../source/Lib/CommonAnalyserLib/../CommonLib/. -I../source/Lib/CommonAnalyserLib/../CommonLib/.. -I../source/Lib/CommonAnalyserLib/../CommonLib/x86 -I../source/Lib/CommonAnalyserLib/../libmd5 -mthreads -mtune=generic -O2 -pipe -fopenmp -O3 -DNDEBUG   -Wall -fdiagnostics-show-option -Werror -Wno-sign-compare -Wno-class-memaccess -msse4.1 -mthreads -std=gnu++11 -mavx -MD -MT source/Lib/CommonAnalyserLib/CMakeFiles/CommonAnalyserLib.dir/__/CommonLib/x86/avx/InterpolationFilter_avx.cpp.o -MF source\Lib\CommonAnalyserLib\CMakeFiles\CommonAnalyserLib.dir\__\CommonLib\x86\avx\InterpolationFilter_avx.cpp.o.d -o source/Lib/CommonAnalyserLib/CMakeFiles/CommonAnalyserLib.dir/__/CommonLib/x86/avx/InterpolationFilter_avx.cpp.o -c ../source/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp
In file included from ../source/Lib/CommonLib/x86/avx/InterpolationFilter_avx.cpp:1:
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h: In function 'void simdInterpolateN2_HIGHBIT_M4(const int16_t*, int, int16_t*, int, int, int, int, int, int, const ClpRng&, const int16_t*)':
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1085:21: error: there are no arguments to '_mm_cvtsi64_si128' that depend on a template parameter, so a declaration of '_mm_cvtsi64_si128' must be available [-fpermissive]
 1085 |   __m128i mmShift = _mm_cvtsi64_si128(shift);
      |                     ^~~~~~~~~~~~~~~~~
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1085:21: note: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h: In instantiation of 'void simdInterpolateN2_HIGHBIT_M4(const int16_t*, int, int16_t*, int, int, int, int, int, int, const ClpRng&, const int16_t*) [with X86_VEXT vext = AVX; bool isLast = false; int16_t = short int]':
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1284:53:   required from 'void simdFilter(const ClpRng&, const Pel*, int, Pel*, int, int, int, const TFilterCoeff*, bool) [with X86_VEXT vext = AVX; int N = 8; bool isVertical = false; bool isFirst = false; bool isLast = false; Pel = short int; TFilterCoeff = short int]'
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1447:24:   required from 'void InterpolationFilter::_initInterpolationFilterX86() [with X86_VEXT vext = AVX]'
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1485:73:   required from here
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1085:38: error: '_mm_cvtsi64_si128' was not declared in this scope; did you mean '_mm_cvtsi32_si128'?
 1085 |   __m128i mmShift = _mm_cvtsi64_si128(shift);
      |                     ~~~~~~~~~~~~~~~~~^~~~~~~
      |                     _mm_cvtsi32_si128
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h: In instantiation of 'void simdInterpolateN2_HIGHBIT_M4(const int16_t*, int, int16_t*, int, int, int, int, int, int, const ClpRng&, const int16_t*) [with X86_VEXT vext = AVX; bool isLast = true; int16_t = short int]':
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1284:53:   required from 'void simdFilter(const ClpRng&, const Pel*, int, Pel*, int, int, int, const TFilterCoeff*, bool) [with X86_VEXT vext = AVX; int N = 8; bool isVertical = false; bool isFirst = false; bool isLast = true; Pel = short int; TFilterCoeff = short int]'
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1448:24:   required from 'void InterpolationFilter::_initInterpolationFilterX86() [with X86_VEXT vext = AVX]'
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1485:73:   required from here
../source/Lib/CommonLib/x86/avx/../InterpolationFilterX86.h:1085:38: error: '_mm_cvtsi64_si128' was not declared in this scope; did you mean '_mm_cvtsi32_si128'?
 1085 |   __m128i mmShift = _mm_cvtsi64_si128(shift);
      |                     ~~~~~~~~~~~~~~~~~^~~~~~~
      |                     _mm_cvtsi32_si128

Change history (7)

comment:1 Changed 5 weeks ago by ligh_de

Setting the priority to "minor" was possibly a mistake...

comment:2 Changed 5 weeks ago by ligh_de

  • Milestone set to VTM-6.2
  • Priority changed from minor to blocker

comment:3 Changed 3 weeks ago by ligh_de

3 weeks without even the slightest reply to a bug which lets the compilation fail.

If you want to drop x86 (32b) support, please tell us at least that.

comment:4 Changed 3 weeks ago by XiangLi

Thanks for the report. VTM does not work properly in 32-bit due to big amount of memory used. Although We have an MR on memory reduction, it may not solve all the issues with 32-bit. It is suggested to test with 64-bit compiler. Fix and improvement for 32-bit are appreciated.

comment:5 Changed 3 weeks ago by ligh_de

Thank you. I will forward to the "media-autobuild suite" staff that it will be safer to restrict building VVC for 64-bit target only, until there may ever be a patch to re-enable 32-bit builds.

comment:6 Changed 3 weeks ago by ksuehring

Your expectations may be wrong here. This is a reference software implementation intended as an example to base your own implementations on. This is very experimental software, being used to verify coding algorithms and their performance. This is not intended to be a final codec implementation suitable to be used in any form of product.

I think we never had proper 32-bit support. Even with the HM reference software for HEVC, which was the base for this code, it was not possible to encode any bigger image formats without hitting the 2GB border.

I don't think, we will be able to achieve that with VTM, even with the memory reduction that Xiang mentioned.

We are also targeting the build platforms that are commonly in use by the people contributing to the standard. See the software manual for a full list.

We added experimental support MSYS2 build on request, but we also were clear that is nothing we can support, because we just don't use platform ourselves and don't have build nodes for it. There is no testing for newer compilers, etc.

For bug fixes we are depending on volunteers looking into the issues and providing patches.

Although we encourage testing the software outside the common test conditions, these conditions are what is currently being tested for all our software releases.

comment:7 Changed 3 weeks ago by ligh_de

Thank you for clarifying the circumstances.

I do remember that already HEVC HM (and x265 subsequently) struggled with the platform limits of 32-bit addressing. I see that VVC will even more so.

Now that this statement has been given, the MABS staff knows that disabling its building for x86 is just how it is supposed.

Note: See TracTickets for help on using tickets.