From a706eca6d188c3dbf0f92b699c577666a82334d0 Mon Sep 17 00:00:00 2001 From: Peter Sobot Date: Mon, 29 Jul 2024 14:27:38 -0400 Subject: [PATCH 1/2] Enable some (but not all) fast-math optimizations for better vectorization. (#78) * Enable some (but not all) fast-math optimizations for better vectorization. * Remove -ffinite-math-only. --- python/setup.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/python/setup.py b/python/setup.py index 1d1a8549..272d28f0 100644 --- a/python/setup.py +++ b/python/setup.py @@ -14,8 +14,8 @@ import os -import sys import platform +import sys from pathlib import Path import numpy as np @@ -24,7 +24,6 @@ from setuptools import Extension, setup from setuptools.command.build_ext import build_ext - # Find the "cpp" folder depending on where this script is run from: for search_path in ["./cpp/", "../cpp/", "../../cpp/"]: path = os.path.abspath(os.path.join(os.path.dirname(__file__), search_path)) @@ -100,6 +99,20 @@ def build_extensions(self): if ct == "unix": opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) opts.append("-std=c++17") + # Allow reordering floating-point operations for + # better automatic vectorization, even without -ffast-math + # See: https://simonbyrne.github.io/notes/fastmath/#flushing_subnormals_to_zero + # for why -ffast-math is not included: + opts.extend( + [ + "-fassociative-math", + "-fno-signaling-nans", + "-fno-trapping-math", + "-fno-signed-zeros", + "-freciprocal-math", + "-fno-math-errno", + ] + ) if has_flag(self.compiler, "-fvisibility=hidden"): opts.append("-fvisibility=hidden") elif ct == "msvc": From e2f232eebb9e7efae9e71465dc7f1087a7aa04b8 Mon Sep 17 00:00:00 2001 From: Dylan Bannon Date: Mon, 29 Jul 2024 14:27:51 -0400 Subject: [PATCH 2/2] bump version to 2.0.8 (#79) * bump java version and regen docs * update python version and regen docs * add new generated doc files * fmt --- docs/java/allclasses-index.html | 24 +- docs/java/allpackages-index.html | 18 +- .../voyager/jni/Index.QueryResults.html | 46 +- .../spotify/voyager/jni/Index.SpaceType.html | 48 +- .../voyager/jni/Index.StorageDataType.html | 46 +- docs/java/com/spotify/voyager/jni/Index.html | 65 +- .../voyager/jni/StringIndex.QueryResults.html | 46 +- .../com/spotify/voyager/jni/StringIndex.html | 155 +++- .../jni/class-use/Index.QueryResults.html | 18 +- .../jni/class-use/Index.SpaceType.html | 18 +- .../jni/class-use/Index.StorageDataType.html | 18 +- .../spotify/voyager/jni/class-use/Index.html | 18 +- .../class-use/StringIndex.QueryResults.html | 18 +- .../voyager/jni/class-use/StringIndex.html | 18 +- .../spotify/voyager/jni/package-summary.html | 35 +- .../com/spotify/voyager/jni/package-tree.html | 22 +- .../com/spotify/voyager/jni/package-use.html | 18 +- .../voyager/jni/utils/JniLibExtractor.html | 44 +- .../spotify/voyager/jni/utils/TinyJson.html | 46 +- .../jni/utils/class-use/JniLibExtractor.html | 18 +- .../voyager/jni/utils/class-use/TinyJson.html | 18 +- .../voyager/jni/utils/package-summary.html | 29 +- .../voyager/jni/utils/package-tree.html | 22 +- .../voyager/jni/utils/package-use.html | 18 +- .../com/spotify/voyager/package-summary.html | 29 +- .../com/spotify/voyager/package-tree.html | 22 +- .../java/com/spotify/voyager/package-use.html | 18 +- docs/java/copy.svg | 33 + docs/java/help-doc.html | 45 +- docs/java/index-all.html | 32 +- docs/java/index.html | 20 +- docs/java/legal/ASSEMBLY_EXCEPTION | 6 +- docs/java/link.svg | 31 + docs/java/member-search-index.js | 2 +- docs/java/overview-summary.html | 8 +- docs/java/overview-tree.html | 22 +- docs/java/script.js | 141 ++- docs/java/search-page.js | 284 ++++++ docs/java/search.html | 77 ++ docs/java/search.js | 612 +++++++----- docs/java/stylesheet.css | 869 +++++++++++++----- docs/python/_static/documentation_options.js | 2 +- docs/python/genindex.html | 8 +- docs/python/index.html | 12 +- docs/python/reference.html | 12 +- docs/python/search.html | 8 +- java/pom.xml | 2 +- python/voyager/version.py | 2 +- 48 files changed, 2190 insertions(+), 933 deletions(-) create mode 100644 docs/java/copy.svg create mode 100644 docs/java/link.svg create mode 100644 docs/java/search-page.js create mode 100644 docs/java/search.html diff --git a/docs/java/allclasses-index.html b/docs/java/allclasses-index.html index 29324ea1..4f2d0602 100644 --- a/docs/java/allclasses-index.html +++ b/docs/java/allclasses-index.html @@ -1,26 +1,21 @@ - + - -All Classes and Interfaces (voyager 2.0.7 API) + +All Classes and Interfaces (voyager 2.0.8 API) - + - -