RE: Proposal for Updating CRC32C with AVX-512 Algorithm.

Devulapalli, Raghuveer <raghuveer.devulapalli@intel.com>

From: "Devulapalli, Raghuveer" <raghuveer.devulapalli@intel.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Bruce Momjian <bruce@momjian.us>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andres Freund <andres@anarazel.de>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, "Shankaran, Akash" <akash.shankaran@intel.com>
Date: 2024-10-29T21:00:17Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Compute CRC32C using AVX-512 instructions where available

Attachments

Here are the latest set of patches built on top of your patch to use __attribute__(target) for AVX-512 popcount. Couple of changes made: 

(1) The SSE42 and AVX-512 CRC32C also use function attributes to build with ISA specific flag. 
(2) Fixes a bug in the earlier version of patch which had performance regressions on SKX because of a bug in the compile time and runtime checks involving the AVX-512 CRC32C code.

Raghuveer 

> -----Original Message-----
> From: Nathan Bossart <nathandbossart@gmail.com>
> Sent: Friday, October 18, 2024 9:32 AM
> To: Devulapalli, Raghuveer <raghuveer.devulapalli@intel.com>
> Cc: Bruce Momjian <bruce@momjian.us>; Alvaro Herrera <alvherre@alvh.no-
> ip.org>; Andres Freund <andres@anarazel.de>; pgsql-
> hackers@lists.postgresql.org; Shankaran, Akash <akash.shankaran@intel.com>
> Subject: Re: Proposal for Updating CRC32C with AVX-512 Algorithm.
> 
> On Tue, Oct 08, 2024 at 08:19:27PM +0000, Devulapalli, Raghuveer wrote:
> > Hi all, I'm currently in the process of reviewing and analyzing Paul's
> > patch. In the meantime, I'm open to addressing any questions or
> > feedback you may have.
> 
> I've proposed a patch to move the existing AVX-512 code in Postgres to use
> __attribute__((target("..."))) instead of per-translation-unit compiler flags [0].  We
> should likely do something similar for this one.
> 
> [0] https://postgr.es/m/ZxAqRG1-8fJLMRUY%40nathan
> 
> --
> nathan