Compare commits

...

5 Commits

Author SHA1 Message Date
BodoBolero
a3475286a9 try platform specific options 2024-06-15 11:54:07 +02:00
BodoBolero
9fc67363a9 as long as PR is not committed this still uses the old workflow 2024-06-15 11:50:14 +02:00
BodoBolero
cf4cdd6cd5 temporarily build only on x64 to test out x64 optflags 2024-06-15 11:31:43 +02:00
BodoBolero
b8940f1685 compare native with x86-64 2024-06-15 11:17:09 +02:00
BodoBolero
c5bc73fff0 test performance difference between generic binaries and optimized binaries 2024-06-15 10:18:42 +02:00

View File

@@ -246,12 +246,17 @@ COPY patches/pgvector.patch /pgvector.patch
# By default, pgvector Makefile uses `-march=native`. We don't want that,
# because we build the images on different machines than where we run them.
# Pass OPTFLAGS="" to remove it.
RUN wget https://github.com/pgvector/pgvector/archive/refs/tags/v0.7.2.tar.gz -O pgvector.tar.gz && \
RUN if [ "$(uname -m)" = "x86_64" ]; then \
OPTFLAGS=" -march=x86-64 "; \
elif [ "$(uname -m)" = "aarch64" ]; then \
OPTFLAGS=""; \
fi && \
wget https://github.com/pgvector/pgvector/archive/refs/tags/v0.7.2.tar.gz -O pgvector.tar.gz && \
echo "617fba855c9bcb41a2a9bc78a78567fd2e147c72afd5bf9d37b31b9591632b30 pgvector.tar.gz" | sha256sum --check && \
mkdir pgvector-src && cd pgvector-src && tar xzf ../pgvector.tar.gz --strip-components=1 -C . && \
patch -p1 < /pgvector.patch && \
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="" PG_CONFIG=/usr/local/pgsql/bin/pg_config && \
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="" install PG_CONFIG=/usr/local/pgsql/bin/pg_config && \
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="$OPTFLAGS" PG_CONFIG=/usr/local/pgsql/bin/pg_config && \
make -j $(getconf _NPROCESSORS_ONLN) OPTFLAGS="$OPTFLAGS" install PG_CONFIG=/usr/local/pgsql/bin/pg_config && \
echo 'trusted = true' >> /usr/local/pgsql/share/extension/vector.control
#########################################################################################