kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #40344
Re: GLM 0.9.9.3 and GLM_FORCE_PURE
-
To:
Mário Luzeiro <mrluzeiro@xxxxx>, "kicad-developers@xxxxxxxxxxxxxxxxxxx" <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Simon Richter <Simon.Richter@xxxxxxxxxx>
-
Date:
Tue, 30 Apr 2019 01:54:00 +0200
-
Autocrypt:
addr=Simon.Richter@xxxxxxxxxx; prefer-encrypt=mutual; keydata= mQINBEsFLRIBEAC7462Btbl5lLGjG+qgeNHfBUBiZ+q47M1xMC9hAQ5nbCSBqxH7eSinz4u9 DSNp4VT5pTkAcnLj2/f3d4Tis7LVRXA5hWS6aHVKvtk0k7TweXzU5nqGBvQUuwEzyx/TOQ8r wx+IhjnIgh5g0enhVVNw3DoTXRHtEqQ6twAMj5WccNy9DApFC07OchJz92/b747juTRL3p0E WQnss8sZ4MKQ7fZhOh6W2QDgvG7ZCKx2UWiRytDzVY+QgCe6oLHG0kIw7rAgqtosSNGZkPZ8 Iav1UVxHDAzOHvyGC48FARvSqExnpJqQU+UK5nYacwH4uoL+Su+un/8DMtpfG8m3+DGiX2Ng DSfvIXOQczaCLRTr9U7ma5v7Y+7sWLO7lbIDH6UYovo2C13iTa8qoSIJa1rM6BbwFntAMXtp LIo+DABepHeswy3ulfb9EmfcS73O/ML+LqlayHUMkwUGx/RsE+ko3asfWmKIMeH9vs7uO2za ZKu/zmIAHb6Zi1i2+47kAKIy/gyFeOPkT8vhRMgZlZ7qSKrKl+5jfWwGInGxePabE4TC4nVJ TZn2Sa0+zb3/h74RLeFpNBhWMH2A0ayIC88mQrzDNSOieaPX+7EjfLBc0n/CUW75hLe3YlFu 0nx/Qit4SyGZP+xN0VYFUw+iVz54+1Io6gQuZHpDwc+nGPBijwARAQABtChTaW1vbiBSaWNo dGVyIDxTaW1vbi5SaWNodGVyQGhvZ3lyb3MuZGU+iQI3BBMBCAAhBQJLBS3AAhsBB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sviRGZBscg5fjIBy+g6M1RYs5qJT60A O4MynmTFn4C2V34i4+prOJXWQVcpwguIHuomTLGT1SDhSE+oelfK
-
In-reply-to:
<AM6PR02MB5702EBA3F295703E66F8E148A9390@AM6PR02MB5702.eurprd02.prod.outlook.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1
Hi Mário,
On 29.04.19 23:49, Mário Luzeiro wrote:
> I was checking the commit, it is a commit by Cirilo from some of my indications for includes and he copied the file at that state.
> I checked my log where that changes come from and there was also noting useful there.
> So it may was some test or something else at that moment.
> I hope SIMD performs better, but it can also be profiled.
I've asked the compiler and performance geeks on Twitter a kind of
backhanded question on the performance impact:
https://twitter.com/GyrosGeier/status/1122945918565867521
In summary, "it's complicated."
From a performance point of view, scalarizing everything and then
autovectorizing after loop unrolling is way better than trusting the
programmer on vectorization, and GLM using intrinsics forces operands
into xmm registers in a particular layout, which then in turn requires
gcc to use vector instructions matching that layout or shuffling them
around.
vec3 is particularly unsuitable for xmm instructions, because there is
no three-element dot product, a quarter of the lanes goes unused all the
time but still impacts performance if it goes denormal or encounters a
domain error.
Intel's OpenCL implementation for GPUs begins with a scalarize pass for
precisely that reason, I expect others to do that as well — but OpenCL
is special in that the topmost loop is external to the compiled code,
which is a luxury we don't have.
So I guess we need to profile this to make a good decision, but we also
need to be able to offer something to people compiling from source on
Debian buster.
> I found also this on the mailing list that may be helpful for you:
> https://www.mail-archive.com/kicad-developers@xxxxxxxxxxxxxxxxxxx/msg32827.html
Yes, that is consistent with the current thread. C++11's constexpr is
slightly different from C++14's, and GLM not taking this into account is
a GLM bug, which they've fixed in later versions, and the fix has also
been backported to Debian buster, so they have a 0.9.9.3 version that
works, which means our current test is too strict.
Avenues I could see:
- the patch as is
unclear performance impact, might be positive or negative or most likely
irrelevant
- switching to C++14
likely no performance impact, also avoids the problem
- detecting broken GLM at configure time, rejecting
the minimal change
- detecting broken GLM at configure time, setting GLM_FORCE_PURE
globally there
might cause two different build configurations with different bugs, so
it will make debugging harder, but at least compiling from source works
for everyone
- repeatedly explaining to people how to update their GLM if kicad
fails to configure
in Brexit terms, the "no-deal" option
Simon
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References