Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 Apr 2023 05:10:41 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c6c877853c23 - main - =?utf-8?Q?math/{,py-}faiss:=20Update=201.7.3=20=E2=86=92=201.7.4?=
Message-ID:  <202304220510.33M5AfrW096004@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c6c877853c23c5b81f3591fda3d389d18c1c27da

commit c6c877853c23c5b81f3591fda3d389d18c1c27da
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-04-22 04:03:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-04-22 05:10:38 +0000

    math/{,py-}faiss: Update 1.7.3 → 1.7.4
    
    Reported by:    portscout
---
 math/faiss/Makefile                         |  4 +++-
 math/faiss/distinfo                         |  6 +++---
 math/faiss/files/patch-tests_CMakeLists.txt | 13 +++++++++++++
 math/faiss/pkg-plist                        | 18 ++++++++++++++++++
 math/py-faiss/Makefile                      | 21 +++++++++++----------
 math/py-faiss/distinfo                      |  6 +++---
 math/py-faiss/pkg-plist                     | 21 +++++++++++++++++++++
 7 files changed, 72 insertions(+), 17 deletions(-)

diff --git a/math/faiss/Makefile b/math/faiss/Makefile
index 620843d67aaa..8ca5a98d8c07 100644
--- a/math/faiss/Makefile
+++ b/math/faiss/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	faiss
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.7.3
+DISTVERSION=	1.7.4
 CATEGORIES=	math
 
 MAINTAINER=	yuri@FreeBSD.org
@@ -23,6 +23,8 @@ USES=		cmake:testing compiler:c++11-lang localbase:ldflags # tests fail to link,
 USE_GITHUB=	yes
 GH_ACCOUNT=	facebookresearch
 
+#LDFLAGS+=	-lgtest #-pthread
+
 CMAKE_ON=	BUILD_SHARED_LIBS
 CMAKE_OFF=	BUILD_TESTING FAISS_ENABLE_GPU FAISS_ENABLE_PYTHON
 
diff --git a/math/faiss/distinfo b/math/faiss/distinfo
index ade7dbc6d2ee..4f8bb75144c3 100644
--- a/math/faiss/distinfo
+++ b/math/faiss/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1673176591
-SHA256 (facebookresearch-faiss-v1.7.3_GH0.tar.gz) = dda1b031957789e6a6f3b37d48ad135b9557a33c5013c1c245ef4bced2d787de
-SIZE (facebookresearch-faiss-v1.7.3_GH0.tar.gz) = 843640
+TIMESTAMP = 1682122179
+SHA256 (facebookresearch-faiss-v1.7.4_GH0.tar.gz) = d9a7b31bf7fd6eb32c10b7ea7ff918160eed5be04fe63bb7b4b4b5f2bbde01ad
+SIZE (facebookresearch-faiss-v1.7.4_GH0.tar.gz) = 909408
diff --git a/math/faiss/files/patch-tests_CMakeLists.txt b/math/faiss/files/patch-tests_CMakeLists.txt
new file mode 100644
index 000000000000..1dea53ae3dbf
--- /dev/null
+++ b/math/faiss/files/patch-tests_CMakeLists.txt
@@ -0,0 +1,13 @@
+- workaround for https://github.com/facebookresearch/faiss/issues/2827
+
+--- tests/CMakeLists.txt.orig	2023-04-19 13:18:30 UTC
++++ tests/CMakeLists.txt
+@@ -52,6 +52,8 @@ find_package(OpenMP REQUIRED)
+ target_link_libraries(faiss_test PRIVATE
+   OpenMP::OpenMP_CXX
+   gtest_main
++  gtest
++  pthread
+ )
+ 
+ # Defines `gtest_discover_tests()`.
diff --git a/math/faiss/pkg-plist b/math/faiss/pkg-plist
index f34b79b86cb7..a2ceb9a7cc42 100644
--- a/math/faiss/pkg-plist
+++ b/math/faiss/pkg-plist
@@ -37,6 +37,7 @@ include/faiss/IndexReplicas.h
 include/faiss/IndexRowwiseMinMax.h
 include/faiss/IndexScalarQuantizer.h
 include/faiss/IndexShards.h
+include/faiss/IndexShardsIVF.h
 include/faiss/MatrixStats.h
 include/faiss/MetaIndexes.h
 include/faiss/MetricType.h
@@ -63,6 +64,9 @@ include/faiss/impl/ResultHandler.h
 include/faiss/impl/ScalarQuantizer.h
 include/faiss/impl/ThreadedIndex-inl.h
 include/faiss/impl/ThreadedIndex.h
+include/faiss/impl/code_distance/code_distance-avx2.h
+include/faiss/impl/code_distance/code_distance-generic.h
+include/faiss/impl/code_distance/code_distance.h
 include/faiss/impl/io.h
 include/faiss/impl/io_macros.h
 include/faiss/impl/kmeans1d.h
@@ -80,7 +84,15 @@ include/faiss/invlists/OnDiskInvertedLists.h
 include/faiss/utils/AlignedTable.h
 include/faiss/utils/Heap.h
 include/faiss/utils/WorkerThread.h
+include/faiss/utils/approx_topk/approx_topk.h
+include/faiss/utils/approx_topk/avx2-inl.h
+include/faiss/utils/approx_topk/generic.h
+include/faiss/utils/approx_topk/mode.h
+include/faiss/utils/approx_topk_hamming/approx_topk_hamming.h
 include/faiss/utils/distances.h
+include/faiss/utils/distances_fused/avx512.h
+include/faiss/utils/distances_fused/distances_fused.h
+include/faiss/utils/distances_fused/simdlib_based.h
 include/faiss/utils/extra_distances-inl.h
 include/faiss/utils/extra_distances.h
 include/faiss/utils/fp16-fp16c.h
@@ -88,6 +100,11 @@ include/faiss/utils/fp16-inl.h
 include/faiss/utils/fp16.h
 include/faiss/utils/hamming-inl.h
 include/faiss/utils/hamming.h
+include/faiss/utils/hamming_distance/avx2-inl.h
+include/faiss/utils/hamming_distance/common.h
+include/faiss/utils/hamming_distance/generic-inl.h
+include/faiss/utils/hamming_distance/hamdis-inl.h
+include/faiss/utils/hamming_distance/neon-inl.h
 include/faiss/utils/ordered_key_value.h
 include/faiss/utils/partitioning.h
 include/faiss/utils/quantize_lut.h
@@ -96,6 +113,7 @@ include/faiss/utils/simdlib.h
 include/faiss/utils/simdlib_avx2.h
 include/faiss/utils/simdlib_emulated.h
 include/faiss/utils/simdlib_neon.h
+include/faiss/utils/transpose/transpose-avx2-inl.h
 include/faiss/utils/utils.h
 lib/libfaiss.so
 %%DATADIR%%/faiss-config-version.cmake
diff --git a/math/py-faiss/Makefile b/math/py-faiss/Makefile
index 20ba38055555..6b11bebd8c30 100644
--- a/math/py-faiss/Makefile
+++ b/math/py-faiss/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	faiss
 DISTVERSIONPREFIX=	v
-DISTVERSION=	1.7.3
+DISTVERSION=	1.7.4
 CATEGORIES=	math
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -20,26 +20,27 @@ LIB_DEPENDS=	libfaiss.so:math/faiss
 RUN_DEPENDS=	${PY_DEPENDS}
 
 USES=		cmake compiler:c++11-lang localbase python
+USE_PYTHON=	flavors pytest
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	facebookresearch
 
 WRKSRC_SUBDIR=	faiss/python
 
-PLIST_FILES=	\
-		${PYTHON_SITELIBDIR}/${PORTNAME}/_swigfaiss.so \
-		${PYTHON_SITELIBDIR}/${PORTNAME}/__init__.py \
-		${PYTHON_SITELIBDIR}/${PORTNAME}/loader.py \
-		${PYTHON_SITELIBDIR}/${PORTNAME}/swigfaiss.py
+CMAKE_ARGS=	-DPython_EXECUTABLE:STRING=${PYTHON_CMD}
+
+TEST_WRKSRC=	${WRKSRC}/../..
+TEST_ENV=	${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+post-patch: # remove GPU testcases
+	${RM} -r ${WRKSRC}/../../faiss/gpu
 
 do-install: # see https://github.com/facebookresearch/faiss/issues/2194
 	${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}
 	${INSTALL_LIB} ${BUILD_WRKSRC}/_swigfaiss.so ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}
-.for f in __init__.py loader.py swigfaiss.py
+.for f in __init__.py array_conversions.py class_wrappers.py extra_wrappers.py gpu_wrappers.py loader.py swigfaiss.py
 	${INSTALL_DATA} ${BUILD_WRKSRC}/${f} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}
 .endfor
-
-do-test: install
-	@${PYTHON_CMD} ${FILESDIR}/test.py
+	cd ${BUILD_WRKSRC} && ${COPYTREE_SHARE} contrib ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}
 
 .include <bsd.port.mk>
diff --git a/math/py-faiss/distinfo b/math/py-faiss/distinfo
index 8604ef8daaa4..f28f117eac63 100644
--- a/math/py-faiss/distinfo
+++ b/math/py-faiss/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1673177458
-SHA256 (facebookresearch-faiss-v1.7.3_GH0.tar.gz) = dda1b031957789e6a6f3b37d48ad135b9557a33c5013c1c245ef4bced2d787de
-SIZE (facebookresearch-faiss-v1.7.3_GH0.tar.gz) = 843640
+TIMESTAMP = 1682124246
+SHA256 (facebookresearch-faiss-v1.7.4_GH0.tar.gz) = d9a7b31bf7fd6eb32c10b7ea7ff918160eed5be04fe63bb7b4b4b5f2bbde01ad
+SIZE (facebookresearch-faiss-v1.7.4_GH0.tar.gz) = 909408
diff --git a/math/py-faiss/pkg-plist b/math/py-faiss/pkg-plist
new file mode 100644
index 000000000000..cb884c112728
--- /dev/null
+++ b/math/py-faiss/pkg-plist
@@ -0,0 +1,21 @@
+%%PYTHON_SITELIBDIR%%/faiss/__init__.py
+%%PYTHON_SITELIBDIR%%/faiss/_swigfaiss.so
+%%PYTHON_SITELIBDIR%%/faiss/array_conversions.py
+%%PYTHON_SITELIBDIR%%/faiss/class_wrappers.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/__init__.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/client_server.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/clustering.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/datasets.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/evaluation.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/exhaustive_search.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/factory_tools.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/inspect_tools.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/ivf_tools.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/ondisk.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/rpc.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/torch_utils.py
+%%PYTHON_SITELIBDIR%%/faiss/contrib/vecs_io.py
+%%PYTHON_SITELIBDIR%%/faiss/extra_wrappers.py
+%%PYTHON_SITELIBDIR%%/faiss/gpu_wrappers.py
+%%PYTHON_SITELIBDIR%%/faiss/loader.py
+%%PYTHON_SITELIBDIR%%/faiss/swigfaiss.py



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304220510.33M5AfrW096004>