[Cin] Fwd: gcc and avx (resend)
Andrew Randrianasulu
randrianasulu at gmail.com
Wed Feb 13 19:01:22 CET 2019
Actually, testing this line of optimizations for x86-64 now:
"-O3 -ffast-math -ftree-vectorizer-verbose=6 -mavx -msahf -mfma -fopt-info-vec-missed=missed_vec.log -march=native -mtune=native -fPIC"
note, -fopt-info-vec-missed=missed_vec.log will produce huge log file, telling
developers about missed vectorization opportunities.
Also, there was -mfpmath=both flag to test, not tested yet
https://ubuntuforums.org/showthread.php?t=1477356
---------- Пересланное сообщение ----------
Тема: gcc and avx (resend)
Дата: Вторник 12 февраля 2019
Отправитель: Andrew Randrianasulu <randrianasulu at gmail.com>
Получатель: "Cinelerra.GG" <cin at lists.cinelerra-gg.org>
resend without attached script. You can download it anyway, but better to save
those scripts localy, i think? because online hosters may disappear ....
-----------------
Well, I don't know asm, so i looked for some nice script for searching inside
objdump's output..
Found this:
https://superuser.com/questions/726395/how-to-check-if-a-binary-requires-sse4-or-avx-on-linux
this leads to
https://pastebin.com/A8bAuHAP
(attached)
running it on color3way plugin resulted in few AVX instructions!
objdump -M
intel -d /dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/color3way/i686/color3way.o | ./opcodes.sh -s
SSE2 -s SSE3 -s SSE -s AVX | less
------------------------
16e: c5 f8 77 vzeroupper
--
427: c5 f8 77 vzeroupper
--
69c: c5 f8 77 vzeroupper
--
721: c5 f8 77 vzeroupper
--
e88: c5 f8 77 vzeroupper
--
f20: c5 f8 77 vzeroupper
--
1000: c5 f8 77 vzeroupper
--
104e: c5 f8 77 vzeroupper
--
4130: c5 f8 77 vzeroupper
-----------------------------
cflags were:
cat /dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/color3way/i686/c_flags
-O3 -march=native -mtune=native -D__STDC_CONSTANT_MACROS -DCIN="cin" -DCINLIB_DIR="/usr/lib/cin" -DCINDAT_DIR="/usr/share/cin" -DCONFIG_DIR="$HOME/.bcast5" -DPLUGIN_DIR="/usr/lib/cin/plugins" -DLOCALE_DIR="/usr/share/locale" -DLADSPA_DIR="/usr/lib/cin/ladspa" -DCIN_BROWSER="firefox" -fno-omit-frame-pointer -fno-math-errno -fno-signed-zeros -pthread -Wall -Wno-unknown-warning -Wno-unused-result -Wno-stringop-overflow -Wno-format-truncation -Wno-format-overflow -Wno-parentheses -Wno-stringop-truncation -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DPNG_SKIP_SETJMP_CHECK=1 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/local/include/freetype2 -I/usr/include/uuid -I/usr/local/include/uuid -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools -I/usr/include/OpenEXR -I/usr/local/include/OpenEXR -DHAVE_CIN_3RDPARTY -DHAVE_GL -DHAVE_XFT -DHAVE_XXF86VM -DHAVE_OSS -DHAVE_ALSA -DHAVE_FIREWIRE -DHAVE_DV -DHAVE_DVB -DHAVE_VIDEO4LINUX2 -DHAVE_OPENEXR -DHAVE_LV2 -DHAVE_COMMERCIAL -DHAVE_LIBZMPEG -DHAVE_SHUTTLE -I../ -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../cinelerra -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../guicast -I../colors -fPIC -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/a52dec-0.7.4/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/djbfft-0.76/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ffmpeg-4.1/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/giflib-5.1.4/lib -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ilmbase-2.2.1/Iex -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ilmbase-2.2.1/Half -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ilmbase-2.2.1/Imath -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ilmbase-2.2.1/config -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/ilmbase-2.2.1/IlmThread -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/lame-3.100/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libraw1394-2.1.2/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libogg-1.3.3/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libtheora-1.1.1/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libuuid-1.0.3/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libvorbis-1.3.6/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libvorbis-1.3.6/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/mjpegtools-2.1.0/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/mjpegtools-2.1.0/lavtools -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/mjpegtools-2.1.0/utils -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libaom-v1.0.0/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/openexr-2.2.1/IlmImf -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/openexr-2.2.1/config -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/openjpeg-2.3.0/src/lib/openjp2 -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/twolame-0.3.13/libtwolame -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/x264-snapshot-20190117-2245-stable/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/x265_3.0/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/x265_3.0/source -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/libvpx-1.7.0/. -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/opus-1.3/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/lv2-1.14.0/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/lv2-1.14.0/usr/local/lib64/lv2 -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/lv2-1.14.0/usr/local/lib/lv2 -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/lilv-0.24.2/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/sratom-0.6.0/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/serd-0.28.0/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/sord-0.16.0/usr/local/include -I/dev/shm/tmp/cinelerra-goodguy-20190211/cinelerra-5.1/plugins/../thirdparty/suil-0.8.4/usr/local/include
but resulting speed still around 9 fps :(
-------------------------------------------------------
More information about the Cin
mailing list