pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007
4+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007
@ 2026-07-31 12:02  "Andreas-Krebbel (@Andreas-Krebbel)" <noreply+Andreas-Krebbel@github.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Andreas-Krebbel (@Andreas-Krebbel) @ 2026-07-31 12:02 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

This implements the proposal from issue #1007 

inline patch 1: Makefile (+1/-1 lines) download inline-1.patchdiff --git a/Makefile b/Makefile index 7e2c8c388..fd5699231 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,7 @@ endif # For auto-vectorization: # - GCC (needs -ftree-vectorize OR -O3) - https://gcc.gnu.org/projects/tree-ssa/vectorization.html # - Clang (could use pragma instead) - https://llvm.org/docs/Vectorizers.html -PG_CFLAGS += $(OPTFLAGS) -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math +PG_CFLAGS += $(OPTFLAGS) -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -ffp-contract=fast # Debug GCC auto-vectorization # PG_CFLAGS += -fopt-info-vec
^ permalink raw [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007
@ 2026-08-04 12:39  "ankane (@ankane)" <noreply+ankane@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ankane (@ankane) @ 2026-08-04 12:39 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007
@ 2026-08-04 12:39  "ankane (@ankane)" <noreply+ankane@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ankane (@ankane) @ 2026-08-04 12:39 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane merged this (commit 1102b6269a74).

^ permalink  raw  [nested|flat] 4+ messages in thread

* Re: [pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007
@ 2026-08-04 12:45  "ankane (@ankane)" <noreply+ankane@github.com>
  2 siblings, 0 replies; 4+ messages in thread

From: ankane (@ankane) @ 2026-08-04 12:45 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Thanks @Andreas-Krebbel.

It looks like Clang defaults to `on` instead of `fast`, but it only changes a single loop on ARM (no changes on x86-64).

```diff
< src/halfutils.c:132:2: remark: vectorized loop (vectorization width: 4, interleaved count: 4) [-Rpass=loop-vectorize]
---
> src/halfutils.c:132:2: remark: vectorized loop (vectorization width: 8, interleaved count: 2) [-Rpass=loop-vectorize]
``` 

^ permalink  raw  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-08-04 12:45 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-07-31 12:02 [pgvector/pgvector] PR #1008: Add -ffp-contract=fast to PG_CFLAGS to enable multiply and add - fix #1007 "Andreas-Krebbel (@Andreas-Krebbel)" <noreply+Andreas-Krebbel@github.com>
2026-08-04 12:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2026-08-04 12:39 ` "ankane (@ankane)" <noreply+ankane@github.com>
2026-08-04 12:45 ` "ankane (@ankane)" <noreply+ankane@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