<div dir="auto">Can we automate this?<div dir="auto"><br></div><div dir="auto">Let's say we implement noop ioctls for radeonsi and iris, and then we run the drivers to collect pgo data on any hw.</div><div dir="auto"><br></div><div dir="auto">Can meson execute this build sequence:</div><div dir="auto">build with pgo=generate</div><div dir="auto">run tests</div><div dir="auto">clean</div><div dir="auto">build with pgo=use</div><div dir="auto"><br></div><div dir="auto">automated as buildtype=release-pgo.</div><div dir="auto"><br></div><div dir="auto">Marek</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed., Feb. 12, 2020, 23:37 Dieter Nützel, <<a href="mailto:Dieter@nuetzel-hh.de">Dieter@nuetzel-hh.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Marek,<br>
<br>
I hoped you would ask this...<br>
...but first sorry for the delay of my announced numbers.<br>
Our family is/was sick, my wife more than me and our children are fine, <br>
again.<br>
So be lenient with me somewhat.<br>
<br>
Am 12.02.2020 19:46, schrieb Marek Olšák:<br>
> How do you enable LTO+PGO? Is it something we could enable by default<br>
> for release builds?<br>
> <br>
> Marek<br>
<br>
I think we can achieve this.<br>
<br>
I'm running with LTO+PGO 'release' since late December (around <br>
Christmas).<br>
My KDE Plasma5 (OpenGL 3.0) system/desktop was never agiler/fluider <br>
since then.<br>
Even the numbers (glmark2) show it. The 'glmark2' numbers are the best <br>
I've ever seen on this system.<br>
LTO offer only some small space reduction and hardly any speedup.<br>
But LTO+PGO is GREAT.<br>
<br>
First I compile with '-Db_lto=true -Db_pgo=generate'.<br>
<br>
mkdir build<br>
cd build<br>
meson ../ --strip --buildtype release -Ddri-drivers= -Dplatforms=drm,x11 <br>
-Dgallium-drivers=r600,radeonsi,swrast -Dvulkan-drivers=amd <br>
-Dgallium-nine=true -Dgallium-opencl=standalone -Dglvnd=true <br>
-Dgallium-va=true -Dgallium-xvmc=false -Dgallium-omx=disabled <br>
-Dgallium-xa=false -Db_lto=true -Db_pgo=generate<br>
<br>
After that my 'build' dir looks like this:<br>
<br>
drwxr-xr-x  8 dieter users    4096 13. Feb 04:34 .<br>
drwxr-xr-x 14 dieter users    4096 13. Feb 04:33 ..<br>
drwxr-xr-x  2 dieter users    4096 13. Feb 04:34 bin<br>
-rw-r--r--  1 dieter users 4369873 13. Feb 04:34 build.ninja<br>
-rw-r--r--  1 dieter users 4236719 13. Feb 04:34 compile_commands.json<br>
drwxr-xr-x  2 dieter users    4096 13. Feb 04:34 include<br>
drwxr-xr-x  2 dieter users    4096 13. Feb 04:34 meson-info<br>
drwxr-xr-x  2 dieter users    4096 13. Feb 04:33 meson-logs<br>
drwxr-xr-x  2 dieter users    4096 13. Feb 04:34 meson-private<br>
drwxr-xr-x 14 dieter users    4096 13. Feb 04:34 src<br>
<br>
time nice +19 ninja<br>
<br>
Lasts ~15 minutes on my aging/'slow' Intel Xeon X3470 Nehalem, 4c/8t, <br>
2.93 GHz, 24 GB, Polaris 20.<br>
Without LTO+PGO it is ~4-5 minutes. (AMD anyone?)<br>
<br>
Then I remove all files/dirs except 'src'.<br>
<br>
Next 'installing' the new built files under '/usr/local/' (mostly <br>
symlinked to /usr/lib64/).<br>
<br>
Now run as much OpenGL/Vulkan progs as I can.<br>
Normaly starting with glmark2 and vkmark.<br>
<br>
Here comes my (whole) list:<br>
Knights<br>
Wireshark<br>
K3b<br>
Skanlite<br>
Kdenlive<br>
GIMP<br>
Krita<br>
FreeCAD<br>
Blender 2.81x<br>
digikam<br>
K4DirStat<br>
Discover<br>
YaST<br>
Do some 'movements'/work in/with every prog.<br>
+<br>
some LibreOffice work (OpenGL enabled)<br>
one or two OpenGL games<br>
and Vulkan games<br>
+<br>
run some WebGL stuff in my browsers (Konqi/FF).<br>
<br>
After that I have the needed '*.gcda' files in 'src'.<br>
<br>
Now second rebuild in 'src'.<br>
Due to the deleted files/dirs I can do a second 'meson' config run in my <br>
current 'build' dir.<br>
<br>
meson ../ --strip --buildtype release -Ddri-drivers= -Dplatforms=drm,x11 <br>
-Dgallium-drivers=r600,radeonsi,swrast -Dvulkan-drivers=amd <br>
-Dgallium-nine=true -Dgallium-opencl=standalone -Dglvnd=true <br>
-Dgallium-va=true -Dgallium-xvmc=false -Dgallium-omx=disabled <br>
-Dgallium-xa=false -Db_lto=true -Db_pgo=use<br>
<br>
After around 5-6 minutes (!!!) I can install the LTO+PGO 'release' build <br>
driver files and enjoy next level of OpenGL speed.<br>
Vulkan do NOT show such GREAT improvements.<br>
<br>
Only '-Db_lto=true -Db_pgo=generate' need ~3 times compilation and <br>
mostly linking time.<br>
<br>
Below are some memory and speed numbers.<br>
Should I send an additional post with a better title to the list?<br>
Hope this helps ;-)))<br>
<br>
-Dieter<br>
<br>
***************************************************************************************************<br>
<br>
Mesa git 21bc16a723 (somewhat older)<br>
<br>
normal<br>
<br>
-rwxr-xr-x   4 root root 9525520 13. Jan 20:00 <br>
libvdpau_radeonsi.so.1.0.0<br>
-rwxr-xr-x   4 root root 9525520 13. Jan 20:00 libvdpau_r600.so.1.0.0<br>
<br>
-rwxr-xr-x   8 root root 18444192 13. Jan 20:00 swrast_dri.so<br>
-rwxr-xr-x   8 root root 18444192 13. Jan 20:00 radeonsi_dri.so<br>
-rwxr-xr-x   8 root root 18444192 13. Jan 20:00 r600_dri.so<br>
-rwxr-xr-x   8 root root 18444192 13. Jan 20:00 kms_swrast_dri.so<br>
-rwxr-xr-x   4 root root  9505072 13. Jan 20:00 radeonsi_drv_video.so<br>
-rwxr-xr-x   4 root root  9505072 13. Jan 20:00 r600_drv_video.so<br>
<br>
<br>
-Db_lto=true<br>
<br>
-rwxr-xr-x 2 root root 8078368 13. Jan 21:24 libvdpau_r600.so.1.0.0<br>
-rwxr-xr-x 2 root root 8078368 13. Jan 21:24 libvdpau_radeonsi.so.1.0.0<br>
<br>
-rwxr-xr-x 4 root root 16878368 13. Jan 21:24 kms_swrast_dri.so<br>
-rwxr-xr-x 4 root root 16878368 13. Jan 21:24 r600_dri.so<br>
-rwxr-xr-x 2 root root  8074312 13. Jan 21:24 r600_drv_video.so<br>
-rwxr-xr-x 4 root root 16878368 13. Jan 21:24 radeonsi_dri.so<br>
-rwxr-xr-x 2 root root  8074312 13. Jan 21:24 radeonsi_drv_video.so<br>
-rwxr-xr-x 4 root root 16878368 13. Jan 21:24 swrast_dri.so<br>
<br>
<br>
-Db_lto=true -Db_pgo=use<br>
<br>
-rwxr-xr-x   4 root root 5600328 14. Jan 00:11 <br>
libvdpau_radeonsi.so.1.0.0<br>
-rwxr-xr-x   4 root root 5600328 14. Jan 00:11 libvdpau_r600.so.1.0.0<br>
<br>
-rwxr-xr-x   8 root root 11172768 14. Jan 00:11 swrast_dri.so<br>
-rwxr-xr-x   8 root root 11172768 14. Jan 00:11 radeonsi_dri.so<br>
-rwxr-xr-x   8 root root 11172768 14. Jan 00:11 r600_dri.so<br>
-rwxr-xr-x   8 root root 11172768 14. Jan 00:11 kms_swrast_dri.so<br>
-rwxr-xr-x   4 root root  5567640 14. Jan 00:11 radeonsi_drv_video.so<br>
-rwxr-xr-x   4 root root  5567640 14. Jan 00:11 r600_drv_video.so<br>
<br>
***************************************************************************************************<br>
<br>
normal<br>
<br>
=======================================================<br>
     glmark2 2017.07<br>
=======================================================<br>
     OpenGL Information<br>
     GL_VENDOR:     X.Org<br>
     GL_RENDERER:   Radeon RX 580 Series (POLARIS10, DRM 3.35.0, <br>
5.4.8-1.g582f5cb-default, LLVM 10.0.0)<br>
     GL_VERSION:    4.6 (Compatibility Profile) Mesa 20.0.0-devel <br>
(git-3a4f8c8158)<br>
=======================================================<br>
[build] use-vbo=false: FPS: 3332 FrameTime: 0.300 ms<br>
[build] use-vbo=true: FPS: 12144 FrameTime: 0.082 ms<br>
[texture] texture-filter=nearest: FPS: 11661 FrameTime: 0.086 ms<br>
[texture] texture-filter=linear: FPS: 11677 FrameTime: 0.086 ms<br>
[texture] texture-filter=mipmap: FPS: 11967 FrameTime: 0.084 ms<br>
[shading] shading=gouraud: FPS: 12047 FrameTime: 0.083 ms<br>
[shading] shading=blinn-phong-inf: FPS: 12120 FrameTime: 0.083 ms<br>
[shading] shading=phong: FPS: 12103 FrameTime: 0.083 ms<br>
[shading] shading=cel: FPS: 11891 FrameTime: 0.084 ms<br>
[bump] bump-render=high-poly: FPS: 11255 FrameTime: 0.089 ms<br>
[bump] bump-render=normals: FPS: 11747 FrameTime: 0.085 ms<br>
[bump] bump-render=height: FPS: 11574 FrameTime: 0.086 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 12546 FrameTime: 0.080 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 11551 FrameTime: <br>
0.087 ms<br>
[pulsar] light=false:quads=5:texture=false: FPS: 11163 FrameTime: 0.090 <br>
ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: <br>
FPS: 5829 FrameTime: 0.172 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[desktop] effect=shadow:windows=4: FPS: 6132 FrameTime: 0.163 ms<br>
[buffer] <br>
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: <br>
FPS: 856 FrameTime: 1.168 ms<br>
[buffer] <br>
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: <br>
FPS: 1136 FrameTime: 0.880 ms<br>
[buffer] <br>
columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: <br>
FPS: 934 FrameTime: 1.071 ms<br>
[ideas] speed=duration: FPS: 3178 FrameTime: 0.315 ms<br>
[jellyfish] <default>: FPS: 9535 FrameTime: 0.105 ms<br>
[terrain] <default>: FPS: 1704 FrameTime: 0.587 ms<br>
[shadow] <default>: FPS: 8704 FrameTime: 0.115 ms<br>
[refract] <default>: FPS: 3307 FrameTime: 0.302 ms<br>
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 11970 FrameTime: <br>
0.084 ms<br>
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 12293 FrameTime: <br>
0.081 ms<br>
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 12059 FrameTime: <br>
0.083 ms<br>
[function] fragment-complexity=low:fragment-steps=5: FPS: 12338 <br>
FrameTime: 0.081 ms<br>
[function] fragment-complexity=medium:fragment-steps=5: FPS: 12257 <br>
FrameTime: 0.082 ms<br>
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 12324 <br>
FrameTime: 0.081 ms<br>
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: <br>
11839 FrameTime: 0.084 ms<br>
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 11880 <br>
FrameTime: 0.084 ms<br>
=======================================================<br>
                                   glmark2 Score: 9304<br>
=======================================================<br>
<br>
***************************************************************************************************<br>
<br>
-Db_lto=true -Db_pgo=use<br>
<br>
=======================================================<br>
     glmark2 2017.07<br>
=======================================================<br>
     OpenGL Information<br>
     GL_VENDOR:     X.Org<br>
     GL_RENDERER:   Radeon RX 580 Series (POLARIS10, DRM 3.36.0, <br>
5.5.2-1.g3a91916-default, LLVM 10.0.0)<br>
     GL_VERSION:    4.6 (Compatibility Profile) Mesa 20.1.0-devel <br>
(git-2799676218)<br>
=======================================================<br>
[build] use-vbo=false: FPS: 3324 FrameTime: 0.301 ms<br>
[build] use-vbo=true: FPS: 14835 FrameTime: 0.067 ms<br>
[texture] texture-filter=nearest: FPS: 14280 FrameTime: 0.070 ms<br>
[texture] texture-filter=linear: FPS: 14398 FrameTime: 0.069 ms<br>
[texture] texture-filter=mipmap: FPS: 14225 FrameTime: 0.070 ms<br>
[shading] shading=gouraud: FPS: 14162 FrameTime: 0.071 ms<br>
[shading] shading=blinn-phong-inf: FPS: 14087 FrameTime: 0.071 ms<br>
[shading] shading=phong: FPS: 14133 FrameTime: 0.071 ms<br>
[shading] shading=cel: FPS: 14116 FrameTime: 0.071 ms<br>
[bump] bump-render=high-poly: FPS: 11632 FrameTime: 0.086 ms<br>
[bump] bump-render=normals: FPS: 14402 FrameTime: 0.069 ms<br>
[bump] bump-render=height: FPS: 14369 FrameTime: 0.070 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 14696 FrameTime: 0.068 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 11628 FrameTime: <br>
0.086 ms<br>
[pulsar] light=false:quads=5:texture=false: FPS: 13094 FrameTime: 0.076 <br>
ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: <br>
FPS: 6635 FrameTime: 0.151 ms<br>
libpng warning: iCCP: known incorrect sRGB profile<br>
[desktop] effect=shadow:windows=4: FPS: 8023 FrameTime: 0.125 ms<br>
[buffer] <br>
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: <br>
FPS: 866 FrameTime: 1.155 ms<br>
[buffer] <br>
columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: <br>
FPS: 1126 FrameTime: 0.888 ms<br>
[buffer] <br>
columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: <br>
FPS: 939 FrameTime: 1.065 ms<br>
[ideas] speed=duration: FPS: 4568 FrameTime: 0.219 ms<br>
[jellyfish] <default>: FPS: 11735 FrameTime: 0.085 ms<br>
[terrain] <default>: FPS: 1691 FrameTime: 0.591 ms<br>
[shadow] <default>: FPS: 11271 FrameTime: 0.089 ms<br>
[refract] <default>: FPS: 3250 FrameTime: 0.308 ms<br>
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 15095 FrameTime: <br>
0.066 ms<br>
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 14874 FrameTime: <br>
0.067 ms<br>
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 14918 FrameTime: <br>
0.067 ms<br>
[function] fragment-complexity=low:fragment-steps=5: FPS: 14995 <br>
FrameTime: 0.067 ms<br>
[function] fragment-complexity=medium:fragment-steps=5: FPS: 14879 <br>
FrameTime: 0.067 ms<br>
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 14910 <br>
FrameTime: 0.067 ms<br>
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: <br>
14969 FrameTime: 0.067 ms<br>
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 14804 <br>
FrameTime: 0.068 ms<br>
=======================================================<br>
                                   glmark2 Score: 11119<br>
=======================================================<br>
<br>
***************************************************************************************************<br>
<br>
> On Wed, Feb 12, 2020 at 1:56 AM Dieter Nützel <<a href="mailto:Dieter@nuetzel-hh.de" target="_blank" rel="noreferrer">Dieter@nuetzel-hh.de</a>><br>
> wrote:<br>
> <br>
>> Hello Gert,<br>
>> <br>
>> your merge 'broke' LTO and then later on PGO compilation/linking.<br>
>> <br>
>> I do generally compiling with<br>
>> '-Dgallium-drivers=r600,radeonsi,swrast'<br>
>> for testing radeonsi and (your) r600 work. ;-)<br>
>> <br>
>> After your merge I get several warnings in 'addrlib' with LTO and<br>
>> even a<br>
>> compiler error (gcc (SUSE Linux) 9.2.1 20200128).<br>
>> <br>
>> I had to disable 'r600' ('swrast' is needed for 'nine') to get a<br>
>> working<br>
>> LTO and even better PGO radeonsi driver.<br>
>> I'm preparing GREAT LTO+PGO (the later is the greater) numbers over<br>
>> the<br>
>> last 2 months. I'll send my results later, today.<br>
>> <br>
>> Summary<br>
>> radeonsi is ~40% smaller and 16-20% faster with PGO (!!!).<br>
>> <br>
>> Honza and the GCC people (Intel's ICC folks) do GREAT things.<br>
>> 'glmark2' numbers are better then 'vkmark'. (Hello, Marek.).<br>
>> <br>
>> Need some sleep.<br>
>> <br>
>> See my log, below.<br>
>> <br>
>> Greetings and GREAT work!<br>
>> <br>
>> -Dieter<br>
</blockquote></div>