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 →
-
Compute CRC32C using AVX-512 instructions where available
- 3c6e8c123896 18.0 landed
Attachments
- v5-0001-Add-a-Postgres-SQL-function-for-crc32c-testing.patch (application/octet-stream) patch v5-0001
- v5-0002-Move-all-HW-checks-to-common-file.patch (application/octet-stream) patch v5-0002
- v5-0003-Add-support-for-the-SIMD-AVX-512-crc32c-algorithm.patch (application/octet-stream) patch v5-0003
- v5-0004-New-COMP_CRC32C-macro-for-AVX512-simplify-code-so.patch (application/octet-stream) patch v5-0004
- v5-0005-use-__attribute__-target-.-for-AVX-512-stuff.patch (application/octet-stream) patch v5-0005
- v5-0006-Use-__attribute__-target-.-for-SSE42-and-AVX512-C.patch (application/octet-stream) patch v5-0006
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