From: akashsha1 (@akashsha1) <noreply+akashsha1@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] PR #531: Add AVX-512 FP16 implementation of halfvec distance functions
Date: Mon, 06 Jan 2025 23:09:40 +0000
Message-ID: <gh-pgvector-pgvector-531-c2574086184@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-531@github.com>
References: <gh-pgvector-pgvector-531@github.com>
> @lucagiac81
>
> I tested the latest revision [a1e3ead](https://github.com/pgvector/pgvector/pull/531/commits/a1e3eadd0ed24092e7d93da32c6e183ae3efb210) using vectordbbench on a r7i.8xlarge instance and achieved qps improvements ranging from 7% to 23%, depending on the dataset.
>
> Dataset qps recall with avx512 qps qps improvement with avx512 recall recallimpact
> Performance1536D50K 10644.763 0.9691 12594.4903 18.32% 0.9626 -0.67%
> Performance1536D5M 6810.1588 0.9338 7332.7366 7.67% 0.927 -0.73%
> Performance768D10M 7916.9702 0.8975 9799.3695 23.78% 0.8949 -0.29%
> Performance768D1M 9847.2079 0.926 11043.1437 12.14% 0.9262 0.02%
> Tests were performed using:
>
> * ef_construction 128
> * ef_search 128
> * k 100
> * full vector stored in the table
> * Amazon linux2
> * gcc 12.4.0
> * binutils 2.39
>
> _Note: gcc >= 12 & binutils >= 2.38 are required for this change to have any effect. Upgrading gcc, without binutils can cause make to fail._
@greenhal thanks for sharing these. This is great improvements.
@jkatz , @nathan-bossart , @ankane - 23% improvements seem like a solid improvement on AWS instances to consider. The PR has also been simplified to automatically take advantage of the new instructions in avx512. Would you be able to help provide any feedback here, and help merge this change?