Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxa1B-009olJ-5z for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 22:14:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1rxa19-00B0qb-Oe for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Apr 2024 22:14:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rxa19-00B0q7-Ey for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 22:14:07 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rxa16-001hBp-6W for pgsql-hackers@lists.postgresql.org; Thu, 18 Apr 2024 22:14:06 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-7d5f87224a8so49728139f.1 for ; Thu, 18 Apr 2024 15:14:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713478442; x=1714083242; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=qGuFpKb1t3a+SoqFWvZseOXsrtwWwNa7VOzyyLmsAfM=; b=AOumP2ZmsKn7Fmoica7fvOkcrJ3NhWrnby3FYT0PTd9EqD/BGO+RRaW5cRe9aj8UHO CrHcJBT3nh5z+30Ym5WBCmoLtxia+Hi+DVrEH5N5bTcddHgEFpMi+bz2Qx+4PPMu+3r5 5gqLWnWU4dHHuJklGrsxK12Ofd3zhIhMT+fhfdJbgatW7CC0U6OUP70fvQb/5fpuxrQ0 9Vxy0KcruKQZr1kWkt6OyfCxgbgkpWXmr7O0fiHFViyNPSQb6FC4ip0rpgaPjcbkX2Z5 EAYlj26y/SKay8YUkh2MbFa39W8C7IOOOPhnHKmgl9qZeYJyIYvS+vr6XwMBT/aAqx2F B0sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713478442; x=1714083242; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=qGuFpKb1t3a+SoqFWvZseOXsrtwWwNa7VOzyyLmsAfM=; b=NWSrY4BLW04+UAKa6hj8iLGJyRlOV6a/7fda5tvWG66sivFJh/ZhUZN/BFgut0O65+ 9eol7xCXKsAkERXLQCRaBKeeisV+12Kkuu6QCzw26fwbDn0V4Iq9xJRiLWu5k83z+oZP DXFPB4OOD/3zEmgXAUr3hwE7Q5V6ngbCcWwI+lAHaVW9DQR7Ia5lZv1XpO8Jx/MgdmSZ f0bnRNDK32y2DTxUzpBOGTVKBw64po+nGfi2fdJWMaB3hk86R1e51elud3g/YNcwRZm1 ArfZUuZsy8xtYE6fcSpO6oi5PuBoooMgz6jfEMeMmNTzefrshB+MXpJkSZd3DeRkQwHe f1Dg== X-Forwarded-Encrypted: i=1; AJvYcCX47xx086mFI55Eobddsv/IUvcuqMkgHHp2eqhq9rbu9qdjYSYzOTc+tezkTbQprCLOiegrscbQPylrf3KXLcpeU3NJgcHqhD1KFAWidd5Fqhb7 X-Gm-Message-State: AOJu0YzAZRyGPMXuxMj5eVVn8qyP+2qNn6BPRyfQTYzL5rz72HJr98LM 9foMZ07m4eE2NxdkGcuNoXx25L8YSqNgl/2YGfO1mpCfswmgi8U0 X-Google-Smtp-Source: AGHT+IFSRSMiGe1JnYecTTmS60tB5bRhIoszi+mkKJ37nKTzBOKp0d/Km7XZzvJu3CsueeOM2km19w== X-Received: by 2002:a6b:db1a:0:b0:7d9:c77b:2e22 with SMTP id t26-20020a6bdb1a000000b007d9c77b2e22mr771987ioc.13.1713478442050; Thu, 18 Apr 2024 15:14:02 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id m1-20020a6bea01000000b007d0c5dfe05csm555449ioc.37.2024.04.18.15.14.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 15:14:01 -0700 (PDT) Date: Thu, 18 Apr 2024 17:13:58 -0500 From: Nathan Bossart To: "Devulapalli, Raghuveer" Cc: "Shankaran, Akash" , Tom Lane , David Rowley , Ants Aasma , Alvaro Herrera , "Amonson, Paul D" , Andres Freund , Noah Misch , Matthias van de Meent , "pgsql-hackers@lists.postgresql.org" Subject: Re: Popcount optimization using AVX512 Message-ID: <20240418221358.GA3927188@nathanxps13> References: <20240408013002.GA1352058@nathanxps13> <3010179.1712540139@sss.pgh.pa.us> <20240418024459.GA3385227@nathanxps13> <20240418195346.GA3506520@nathanxps13> <20240418210158.GA3776258@nathanxps13> <20240418215902.GA3830246@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Apr 18, 2024 at 10:11:08PM +0000, Devulapalli, Raghuveer wrote: >> On that note, is it necessary to also check for avx512f? At the moment, >> we are assuming that's supported if the other AVX-512 instructions are >> available. > > No, it's not needed. There are no CPU's with avx512bw/avx512popcnt > without avx512f. Unfortunately though, avx512popcnt does not mean > avx512bw (I think the deprecated Xeon Phi processors falls in this > category) which is why we need both. Makes sense, thanks. I'm planning to commit this fix sometime early next week. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com