pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: lucagiac81 (@lucagiac81) <noreply+lucagiac81@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: Thu, 10 Apr 2025 20:11:55 +0000
Message-ID: <gh-pgvector-pgvector-531-c2795054737@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-531@github.com>
References: <gh-pgvector-pgvector-531@github.com>

We'd like to propose a refactoring to make platform-specific optimizations easier to maintain.

In the latest update, AVX-512 functions are moved to separate files. The functions are also included by conditional compilation (enabled by default). In this way, AVX-512 implementations are all in one place, and they can be easily disabled in the build if desired. 
AVX-512 feature detection is currently in the same files. In the future, we could also move detection to a common location if duplication becomes a concern.

This approach is easily extended to future contributions and different architectures. This will allow pgvector to benefit from targeted optimizations while keeping the "core" code uncluttered. It will also clarify where particular expertise is needed for maintenance and improvements.

@ankane do you see this as a viable approach to integrate these optimizations? Please let us know your thoughts.

view thread (32+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-531-c2795054737@github.com>
Permalink:  ../gh-pgvector-pgvector-531-c2795054737@github.com/

 · 


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