November 03, 2017
On Friday, 3 November 2017 at 19:46:58 UTC, Walter Bright wrote:
> On 11/3/2017 3:02 AM, Mike Parker wrote:
>> For clarity, where the changeling says that GDC & LDC use auto-vectorization, that's actually happening with the array operations and core.simd is not required, correct?
>
> I think that GDC and LDC do do auto-vectorization, but I haven't verified it myself.
>
> Auto-vectorization is a fundamentally bizarre feature. It takes low level code and reverse-engineers it back into a higher level construct, and then proceeds to generate code for that higher level construct.
>
> Everything else a compiler does is start from a high level construct and then generate low level code.
>
> The trouble with AV is whether it succeeds or not depends on peculiarities (and I mean peculiarities) of the particular vector instruction set target. It can decided to not vectorize based on seemingly trivial and innocuous changes to the loop.

I’ll share an anecdotal experience from a time I worked in reasearch lab of a well known tech giant. 2 senior researchers spent literally 2 weeks trying to coerce compiler into vectorizing an inner loop of a non-trivial matrix algorithm.

The only diagnostic from compiler was “loop form is not correct”. Thankfully it did tell them it failed, else they’d have to disassemble it each time.

I think eventually they either rewritten it to fit heuristic or just carried on with explicit intrinsics.


> What's needed is a language feature that is straightforwardly vectorizable. That would be D's array operations.

Sadly array ops would be insufficient for said problem. It wasn’t a direct element wise expression.


November 04, 2017
On Friday, 3 November 2017 at 14:00:38 UTC, Arun Chandrasekaran wrote:
> Mike, thanks for the blog post. Few lines about how the name mangling issue was addressed would've been interesting know on the blog.

The regarding main PR contains a lot of info: https://github.com/dlang/dmd/pull/5855
For example, some quick stats on the reduced size of Phobos:

https://github.com/dlang/dmd/pull/5855#issuecomment-315565256
November 04, 2017
On 11/3/2017 1:20 PM, Dmitry Olshansky wrote:
> Sadly array ops would be insufficient for said problem. It wasn’t a direct element wise expression.

That sounds like that might be why it failed vectorization :-)

If you recall the expression, it would be interesting to see it.

November 04, 2017
On Saturday, 4 November 2017 at 08:19:17 UTC, Walter Bright wrote:
> On 11/3/2017 1:20 PM, Dmitry Olshansky wrote:
>> Sadly array ops would be insufficient for said problem. It wasn’t a direct element wise expression.
>
> That sounds like that might be why it failed vectorization :-)

As I recall it there were no trivial loops there. Usually these 2 magicians could make compiler eat it in a few hours of shuffling the code. They vectorized about half a dozen loops that way.

The last one took 10 times more then the others taken together ;)

>
> If you recall the expression, it would be interesting to see it.

Even if I had it saved somewhere the place was NDA-ed to death. I traded 3 months of intellectual work (and property) for a modest amount of money. Interesting experience but no illusions about R&D centers anymore.

1 2 3
Next ›   Last »