Live data from Hacker News

Using the most unhinged AVX-512 instruction to make fastest phrase search algo

gab-menezes.github.io

11–20 of 62 posts

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#11
post #9

Imo the most "unhinged" cpus for AVX-512 are early batches of Alder Lakes which is the only cpu family that has nearly full coverage of all existing avx-512 subsets.

Do they cover anything Sapphire Rapids Xeon's don't? I thought they share the same arch (Golden Cove).

Yes, you are right; I meant "consumer grade cpu".

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#12
post #9

Imo the most "unhinged" cpus for AVX-512 are early batches of Alder Lakes which is the only cpu family that has nearly full coverage of all existing avx-512 subsets.

Do they cover anything Sapphire Rapids Xeon's don't? I thought they share the same arch (Golden Cove).

According to this [1] wikipedia article, the only feature Sapphire Rapids doesn't support is VP2INTERSECT.

[1]:https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#13
post #12
post #9

Earlier quoted context omitted.

Do they cover anything Sapphire Rapids Xeon's don't? I thought they share the same arch (Golden Cove).

According to this [1] wikipedia article, the only feature Sapphire Rapids doesn't support is VP2INTERSECT. [1]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

It seems that there are faster alternatives to it

https://arxiv.org/abs/2112.06342

https://www.reddit.com/r/asm/comments/110pld0/fasterthannati...

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#14

Imo the most "unhinged" cpus for AVX-512 are early batches of Alder Lakes which is the only cpu family that has nearly full coverage of all existing avx-512 subsets.

It's a shame that Intel seemed to really not want people to use it, given they started disabling the ability to use it in future microcode, and fused it off in later parts.

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#15
post #12

Earlier quoted context omitted.

According to this [1] wikipedia article, the only feature Sapphire Rapids doesn't support is VP2INTERSECT. [1]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions

It seems that there are faster alternatives to it https://arxiv.org/abs/2112.06342 https://www.reddit.com/r/asm/comments/110pld0/fasterthannati...

Or Zen 5. :-p

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#16

Imo the most "unhinged" cpus for AVX-512 are early batches of Alder Lakes which is the only cpu family that has nearly full coverage of all existing avx-512 subsets.

It's a shame that Intel seemed to really not want people to use it, given they started disabling the ability to use it in future microcode, and fused it off in later parts.

> It's a shame that Intel seemed to really not want people to use it

AVX-512 was never part of the specification for those CPUs. It was never advertised as a feature or selling point. You had to disable the E cores to enable AVX-512, assuming your motherboard even supported it.

Alder Lake AVX-512 has reached mythical status, but I think the number of people angry about it is far higher than the number of people who ever could have taken advantage of it and benefitted from it. For general purpose workloads, having the E cores enabled (and therefore AVX-512 disabled) was faster. You had to have an extremely specific workload that didn't scale well with additional cores and also had hot loops that benefitted from AVX-512, which was not very common.

So you're right: They never wanted people to use it. It wasn't advertised and wasn't usable without sacrificing all of the E cores and doing a lot of manual configuration work. I suspect they didn't want people using it because they never validated it. AVX-512 mode increased the voltages, which would impact things like failure rate and warranty returns. They probably meant to turn it off but forgot in the first versions.

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#18

Earlier quoted context omitted.

It's a shame that Intel seemed to really not want people to use it, given they started disabling the ability to use it in future microcode, and fused it off in later parts.

> It's a shame that Intel seemed to really not want people to use it AVX-512 was never part of the specification for those CPUs. It was never advertised as a feature or selling point. You had to disable the E cores to enable AVX-512, assuming your motherboard even supported it. Alder Lake AVX-512 has reached mythical status, but I think the number of people angry about it is far higher than the number of people who e…

The reason you had to disable the E cores was... also an artificial barrier imposed by Intel. Enabling AVX-512 only looks like a problem when inside that false dichotomy. You can have both with a bit of scheduler awareness.

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#19
post #2

Spoiler if you don’t want to read through the (wonder but many) paragraphs of exposition: the instruction is `vp2intersectq k, zmm, zmm`.

Not just that, but the fact that Intel CPUs execute it 20-30 times slower than AMD Zen 5 CPUs.

Also, the fact that it's deprecated by Intel.

Re: Using the most unhinged AVX-512 instruction to make fastest phrase search algo

#20
What a post. It should have taken a week just to write it, never mind the amount of time it took to actually come up with all this stuff and overcome all the obstacles mentioned. What a dedication to improving the performance of phrase search.
Post reply on HN