public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/FBGEMM/files/, dev-libs/FBGEMM/
@ 2023-04-12  6:14 Alfredo Tupone
  0 siblings, 0 replies; 2+ messages in thread
From: Alfredo Tupone @ 2023-04-12  6:14 UTC (permalink / raw
  To: gentoo-commits

commit:     37c1cb1766eec979844d0718a81936797391ed4a
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 12 06:11:34 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Apr 12 06:13:52 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37c1cb17

dev-libs/FBGEMM: test require C++14

Closes: https://bugs.gentoo.org/904134
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-libs/FBGEMM/FBGEMM-2023.02.10.ebuild             |  1 +
 dev-libs/FBGEMM/files/FBGEMM-2022.01.13-gentoo.patch | 12 ++++++------
 dev-libs/FBGEMM/files/FBGEMM-2023.02.10-test.patch   | 11 +++++++++++
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/dev-libs/FBGEMM/FBGEMM-2023.02.10.ebuild b/dev-libs/FBGEMM/FBGEMM-2023.02.10.ebuild
index 194619787e6d..22674b795e6c 100644
--- a/dev-libs/FBGEMM/FBGEMM-2023.02.10.ebuild
+++ b/dev-libs/FBGEMM/FBGEMM-2023.02.10.ebuild
@@ -50,6 +50,7 @@ python_check_deps() {
 PATCHES=(
 	"${FILESDIR}"/${PN}-2022.01.13-gentoo.patch
 	"${FILESDIR}"/${PN}-2022.07.16-gcc13.patch
+	"${FILESDIR}"/${P}-test.patch
 )
 
 src_prepare() {

diff --git a/dev-libs/FBGEMM/files/FBGEMM-2022.01.13-gentoo.patch b/dev-libs/FBGEMM/files/FBGEMM-2022.01.13-gentoo.patch
index e2aacd3f65ef..9ff87d5b6cb4 100644
--- a/dev-libs/FBGEMM/files/FBGEMM-2022.01.13-gentoo.patch
+++ b/dev-libs/FBGEMM/files/FBGEMM-2022.01.13-gentoo.patch
@@ -1,6 +1,6 @@
 --- a/CMakeLists.txt	2022-05-21 13:13:50.806813151 +0200
 +++ b/CMakeLists.txt	2022-05-21 13:16:46.448969453 +0200
-@@ -165,7 +165,7 @@
+@@ -187,7 +187,7 @@
  message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}")
  message(WARNING "==========")
  
@@ -9,8 +9,8 @@
    #Download asmjit from github if ASMJIT_SRC_DIR is not specified.
    if(NOT DEFINED ASMJIT_SRC_DIR)
      set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit"
-@@ -184,7 +184,7 @@
-   set_property(TARGET asmjit PROPERTY POSITION_INDEPENDENT_CODE ON)
+@@ -216,7 +216,7 @@
+   endif()
  endif()
  
 -if(NOT TARGET cpuinfo)
@@ -18,7 +18,7 @@
    #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
    if(NOT DEFINED CPUINFO_SOURCE_DIR)
      set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo"
-@@ -261,7 +261,6 @@
+@@ -293,7 +293,6 @@
  
  target_link_libraries(fbgemm $<BUILD_INTERFACE:asmjit>
    $<BUILD_INTERFACE:cpuinfo>)
@@ -26,7 +26,7 @@
  
  install(TARGETS fbgemm EXPORT fbgemmLibraryConfig
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
-@@ -268,6 +268,8 @@
+@@ -302,6 +301,8 @@
  
  install(FILES ${FBGEMM_PUBLIC_HEADERS}
    DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/fbgemm")
@@ -45,7 +45,7 @@
    #Download Googletest framework from github if
    #GOOGLETEST_SOURCE_DIR is not specified.
    if(NOT DEFINED GOOGLETEST_SOURCE_DIR)
-@@ -62,7 +62,6 @@
+@@ -67,7 +67,6 @@
      target_link_libraries(${TESTNAME} ${OpenMP_CXX_LIBRARIES})
    endif()
  

diff --git a/dev-libs/FBGEMM/files/FBGEMM-2023.02.10-test.patch b/dev-libs/FBGEMM/files/FBGEMM-2023.02.10-test.patch
new file mode 100644
index 000000000000..062887a01819
--- /dev/null
+++ b/dev-libs/FBGEMM/files/FBGEMM-2023.02.10-test.patch
@@ -0,0 +1,11 @@
+--- a/test/CMakeLists.txt	2023-04-12 07:53:37.904871157 +0200
++++ b/test/CMakeLists.txt	2023-04-12 07:53:56.597572954 +0200
+@@ -39,7 +39,7 @@
+     QuantizationHelpers.cc
+     TestUtils.cc)
+   set_target_properties(${TESTNAME} PROPERTIES
+-          CXX_STANDARD 11
++          CXX_STANDARD 14
+           CXX_EXTENSIONS NO)
+   #To compile test files with AVX2 turned on
+   #For static build, defining FBGEMM_STATIC to avoid generating


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-libs/FBGEMM/files/, dev-libs/FBGEMM/
@ 2023-12-02 20:59 Alfredo Tupone
  0 siblings, 0 replies; 2+ messages in thread
From: Alfredo Tupone @ 2023-12-02 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     a18e19013d93822a2dffc221dc3d9bf5285db7e8
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  2 20:57:26 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Dec  2 20:59:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a18e1901

dev-libs/FBGEMM: add 2023.11.02

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-libs/FBGEMM/FBGEMM-2023.11.02.ebuild           | 79 ++++++++++++++++++++++
 dev-libs/FBGEMM/Manifest                           |  1 +
 .../FBGEMM/files/FBGEMM-2023.11.02-gentoo.patch    | 69 +++++++++++++++++++
 3 files changed, 149 insertions(+)

diff --git a/dev-libs/FBGEMM/FBGEMM-2023.11.02.ebuild b/dev-libs/FBGEMM/FBGEMM-2023.11.02.ebuild
new file mode 100644
index 000000000000..e4307e16afe8
--- /dev/null
+++ b/dev-libs/FBGEMM/FBGEMM-2023.11.02.ebuild
@@ -0,0 +1,79 @@
+# Copyright 2022-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{9..11} )
+inherit python-any-r1 flag-o-matic cmake
+
+CommitId=cdae5d97e3aa9fda4222f31c04dbd80249c918d1
+
+DESCRIPTION="Facebook GEneral Matrix Multiplication"
+HOMEPAGE="https://github.com/pytorch/FBGEMM"
+SRC_URI="https://github.com/pytorch/${PN}/archive/${CommitId}.tar.gz
+	-> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc test"
+
+DEPEND="
+	>=dev-libs/asmjit-2022.07.02
+	dev-libs/cpuinfo
+"
+RDEPEND="${DEPEND}"
+BDEPEND="
+	test? ( dev-cpp/gtest )
+	doc? (
+		$(python_gen_any_dep '
+			dev-python/sphinx[${PYTHON_USEDEP}]
+			dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
+			dev-python/breathe[${PYTHON_USEDEP}]
+		')
+	)
+	${PYTHON_DEPS}
+"
+RESTRICT="!test? ( test )"
+
+S="${WORKDIR}"/${PN}-${CommitId}
+
+python_check_deps() {
+	if use doc; then
+		python_has_version \
+			"dev-python/sphinx[${PYTHON_USEDEP}]" \
+			"dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]" \
+			"dev-python/breathe[${PYTHON_USEDEP}]"
+	fi
+}
+
+PATCHES=(
+	"${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_prepare() {
+	# Bug #855668
+	filter-lto
+
+	rm test/RowWiseSparseAdagradFusedTest.cc || die
+	rm test/SparseAdagradTest.cc || die
+	sed -i \
+		-e "/-Werror/d" \
+		CMakeLists.txt \
+		|| die
+	cmake_src_prepare
+}
+
+src_configure() {
+	local mycmakeargs=(
+		-DFBGEMM_LIBRARY_TYPE=shared
+		-DFBGEMM_BUILD_BENCHMARKS=OFF
+		-DFBGEMM_BUILD_DOCS=$(usex doc ON OFF)
+		-DFBGEMM_BUILD_TESTS=$(usex test ON OFF)
+	)
+	cmake_src_configure
+}
+
+src_test() {
+	OMP_STACKSIZE=512k cmake_src_test
+}

diff --git a/dev-libs/FBGEMM/Manifest b/dev-libs/FBGEMM/Manifest
index 5ca7cee0d7e4..537d3f459c6a 100644
--- a/dev-libs/FBGEMM/Manifest
+++ b/dev-libs/FBGEMM/Manifest
@@ -1 +1,2 @@
 DIST FBGEMM-2023.02.10.tar.gz 854918 BLAKE2B 2af11baf95c1f33e1b1dd6f2a51dde2c991ff0f606402a7aaa539b7bc505c3707cafaa96d8f742c91672ec09a1f18a69f0e69c012b6db11d5297d602b8f4860c SHA512 a59d928150d674c56b5d38f73e62b5f4e2b527ea1f7ebb891ea1d3356e4183e0f469d145fca37fcb1c85f8773cf54226a8e41389fe9783474c457a7bd31846d6
+DIST FBGEMM-2023.11.02.tar.gz 895265 BLAKE2B 0f884147a86881159485680f1cb0c7b7e65bba5a98e62c38534041264f920e08a268e348e3d82ba3d246226a10f592d86dc37bce0cfa42c72dad478041a6c807 SHA512 030f27a120586240c5f80026bd033cf6fedbe1ae12a667308d33d6321f2334021d474a3625795d1f34734336b688b19c09134e10d5cc8dec86e84485de298584

diff --git a/dev-libs/FBGEMM/files/FBGEMM-2023.11.02-gentoo.patch b/dev-libs/FBGEMM/files/FBGEMM-2023.11.02-gentoo.patch
new file mode 100644
index 000000000000..6ff4950211a2
--- /dev/null
+++ b/dev-libs/FBGEMM/files/FBGEMM-2023.11.02-gentoo.patch
@@ -0,0 +1,69 @@
+--- a/CMakeLists.txt	2022-05-21 13:13:50.806813151 +0200
++++ b/CMakeLists.txt	2022-05-21 13:16:46.448969453 +0200
+@@ -225,7 +225,7 @@
+ message(WARNING "CMAKE_CXX_FLAGS_RELEASE is ${CMAKE_CXX_FLAGS_RELEASE}")
+ message(WARNING "==========")
+ 
+-if(NOT TARGET asmjit)
++if(FALSE)
+   #Download asmjit from github if ASMJIT_SRC_DIR is not specified.
+   if(NOT DEFINED ASMJIT_SRC_DIR)
+     set(ASMJIT_SRC_DIR "${FBGEMM_SOURCE_DIR}/third_party/asmjit"
+@@ -254,7 +254,7 @@
+   endif()
+ endif()
+ 
+-if(NOT TARGET cpuinfo)
++if(FALSE)
+   #Download cpuinfo from github if CPUINFO_SOURCE_DIR is not specified.
+   if(NOT DEFINED CPUINFO_SOURCE_DIR)
+     set(CPUINFO_SOURCE_DIR "${FBGEMM_SOURCE_DIR}/third_party/cpuinfo"
+@@ -330,9 +330,6 @@
+ target_link_libraries(fbgemm
+   $<BUILD_INTERFACE:asmjit>
+   $<BUILD_INTERFACE:cpuinfo>)
+-add_dependencies(fbgemm
+-  asmjit
+-  cpuinfo)
+ 
+ if(OpenMP_FOUND)
+   target_link_libraries(fbgemm OpenMP::OpenMP_CXX)
+@@ -349,6 +346,9 @@
+   FILES ${FBGEMM_PUBLIC_HEADERS}
+   DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/fbgemm")
+ 
++install(FILES src/RefImplementations.h
++  DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/fbgemm/src")
++
+ install(
+   EXPORT fbgemmLibraryConfig
+   DESTINATION share/cmake/fbgemm
+--- a/test/CMakeLists.txt	2022-05-21 13:15:34.140135199 +0200
++++ b/test/CMakeLists.txt	2022-05-21 13:17:59.170813431 +0200
+@@ -8,7 +8,7 @@
+ set(CMAKE_C_EXTENSIONS OFF)
+ set(CMAKE_C_STANDARD_REQUIRED ON)
+ 
+-if(FBGEMM_BUILD_TESTS AND NOT TARGET gtest)
++if(FALSE)
+   #Download Googletest framework from github if
+   #GOOGLETEST_SOURCE_DIR is not specified.
+   if(NOT DEFINED GOOGLETEST_SOURCE_DIR)
+@@ -72,7 +72,6 @@
+     target_link_libraries(${TESTNAME} ${OpenMP_CXX_LIBRARIES})
+   endif()
+ 
+-  add_dependencies(${TESTNAME} gtest fbgemm)
+   add_test(${TESTNAME} ${TESTNAME})
+   set_target_properties(${TESTNAME} PROPERTIES FOLDER test)
+ endmacro()
+--- a/src/PackMatrix.cc	2022-05-24 08:19:00.639462626 +0200
++++ b/src/PackMatrix.cc	2022-05-24 08:27:59.127720548 +0200
+@@ -30,6 +30,7 @@
+ }
+ 
+ template <typename PT, typename inpType, typename accType>
++FBGEMM_API
+ int PackMatrix<PT, inpType, accType>::packedBufferSize(
+     int rows,
+     int cols,


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-02 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-12  6:14 [gentoo-commits] repo/gentoo:master commit in: dev-libs/FBGEMM/files/, dev-libs/FBGEMM/ Alfredo Tupone
  -- strict thread matches above, loose matches on Subject: below --
2023-12-02 20:59 Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox