[Interest] Slow graphics effect (due to _dl_resolve_runtime_avx)

Ch'Gans chgans at gna.org
Sat Nov 26 01:11:43 CET 2016


On 26 November 2016 at 13:01, Ch'Gans <chgans at gna.org> wrote:
> On 26 November 2016 at 11:57, Thiago Macieira <thiago.macieira at intel.com> wrote:
>> On sábado, 26 de novembro de 2016 11:37:39 PST Ch'Gans wrote:
>>> I have run valgrind function profiler here, and it seems that my app
>>> spend most of it's time in:
>>> - QApplication::exec()/QGuiApplication::exec()
>>> - _dl_runtime_resolv_avx/_dl_runtime_resolve_avx'2
>>
>> That's a useless result. Your tool is telling you not the proper time of each
>> function, but the aggregate time of that function and everything it called.
>
> Well, I thought that maybe the role of _dl_runtime_resolv_avx was to
> actually only resolve the function, not execute it as well...
>
>> It's like saying that your application spends most of its time in main. We
>> knew that... Drill down and find out what's happening. Very likely, the effect
>> you turned on is too slow for your CPU or GPU, or in combination with some
>> other system-dependent use.
>
> /proc/cpu tells me that the CPU supports AVX (no trace of AVX2). So
> could it be a bug somewhere. basically the wrong implementation is
> called, or my CPU is not good enough, well it's a modern AMD:  "AMD
> FX(tm)-8320 Eight-Core Processor".
>
> What I'm trying to find out, is that is it a Qt problem (relying on
> AVX2 on a CPU that doesn't support it), or is it a KUbuntu problem, or
> ...
>
> As well, is there a simple way to disable AVX2 within Qt?
>
> I find it a bit crazy that Qt graphics performance are that bad on a
> modern desktop computer using latest (or almost) AMD CPU.

So according to /usr/lib/x86_64-linux-gnu/libQt5Widgets.prl (KUbuntu's
Qt), Qt was built with avx and avx2, according to
/opt/Qt/5.7/gcc_64/lib/libQt5Widgets.prl (Form Official Qt binaries),
Qt was built with avx, avx2, avx512f, avx512er, avx512cd, and avx512pf

Which means that in both cases, Qt will perform poorly on CPU that
doesn't support advanced AVX feature...

According to http://stackoverflow.com/questions/23676426/disable-avx2-functions-on-non-haswell-processors,
it should be possible to detect at run time if AVX[FooBarBaz] is
supported or not.
Shouldn't Qt do that by default? Do i really have to switch to Intel
CPU to use a Qt's drop shadow effect? And tell all my users that will
suffer from the same restriction?

I'm really surprise that because of using AMD CPU, graphics
performance will degrade seriously...

Should I open a JIRA for that?

Chris

>
>
> Chris
>
>>
>> --
>> Thiago Macieira - thiago.macieira (AT) intel.com
>>   Software Architect - Intel Open Source Technology Center
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list