pg.ddx.io pgsql-hackers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Ants Aasma <ants.aasma@cybertec.at>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Amonson, Paul D <paul.d.amonson@intel.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Shankaran, Akash <akash.shankaran@intel.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Popcount optimization using AVX512
Date: Fri, 5 Apr 2024 20:17:04 -0500
Message-ID: <20240406011704.GB167028@nathanxps13> (raw)
In-Reply-To: <CAApHDvrqVoduZRNTct5yn_6e=i7TkqhzSxt96WQQDxEkgdGeWg@mail.gmail.com>
References: <20240401213140.GA2362108@nathanxps13>
<CANwKhkNs9WnqCZDV3bKgaqZix0_NC1T=wf77=k4jYgG=Qr-vzw@mail.gmail.com>
<20240403225029.GA3851411@nathanxps13>
<CANwKhkO9RS_O2H4oeaXzfmBanXFeETq9de7Fuw5kkTLGAQJEvw@mail.gmail.com>
<20240404172840.GB3866970@nathanxps13>
<20240405041543.GA4100924@nathanxps13>
<CANwKhkMQtZCxa+nq=9QAoT6rgSQ48cVpH83tO3Md+-ck4bVz2w@mail.gmail.com>
<20240405125844.GB4102502@nathanxps13>
<20240405153811.GA9352@nathanxps13>
<CAApHDvrqVoduZRNTct5yn_6e=i7TkqhzSxt96WQQDxEkgdGeWg@mail.gmail.com>
On Sat, Apr 06, 2024 at 12:08:14PM +1300, David Rowley wrote:
> Won't Valgrind complain about this?
>
> +pg_popcount_avx512(const char *buf, int bytes)
>
> + buf = (const char *) TYPEALIGN_DOWN(sizeof(__m512i), buf);
>
> + val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
I haven't been able to generate any complaints, at least with some simple
tests. But I see your point. If this did cause such complaints, ISTM we'd
just want to add it to the suppression file. Otherwise, I think we'd have
to go back to the non-maskz approach (which I really wanted to avoid
because of the weird function overhead juggling) or find another way to do
a partial load into an __m512i.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
view thread (173+ messages) latest in thread
Message-ID: <20240406011704.GB167028@nathanxps13> Permalink: ../20240406011704.GB167028@nathanxps13/ Also on: postgresql.org/message-id/20240406011704.GB167028@nathanxps13 ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients using the --to and --cc options: reply via email To: pgsql-hackers@postgresql.org Cc: nathandbossart@gmail.com, dgrowleyml@gmail.com, ants.aasma@cybertec.at, alvherre@alvh.no-ip.org, paul.d.amonson@intel.com, tgl@sss.pgh.pa.us, andres@anarazel.de, akash.shankaran@intel.com, noah@leadboat.com, boekewurm+postgres@gmail.com, pgsql-hackers@lists.postgresql.org Subject: Re: Popcount optimization using AVX512 In-Reply-To: <20240406011704.GB167028@nathanxps13> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox