summaryrefslogtreecommitdiff
path: root/dev-libs/FBGEMM
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-12-02 22:56:13 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-12-02 22:56:13 +0000
commit3652885475bb4bf8de9f4f8e06553d5dbd4dd03d (patch)
tree50643bb9e9c6a0980edbdd0a6e1431f3af997328 /dev-libs/FBGEMM
parentd602f48b0029adc0d2ad1fceed902419909e98ac (diff)
gentoo auto-resync : 02:12:2023 - 22:56:13
Diffstat (limited to 'dev-libs/FBGEMM')
-rw-r--r--dev-libs/FBGEMM/FBGEMM-2023.11.02.ebuild79
-rw-r--r--dev-libs/FBGEMM/Manifest3
-rw-r--r--dev-libs/FBGEMM/files/FBGEMM-2023.11.02-gentoo.patch69
3 files changed, 151 insertions, 0 deletions
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 56b9ce0f3228..c1e4e42ca33d 100644
--- a/dev-libs/FBGEMM/Manifest
+++ b/dev-libs/FBGEMM/Manifest
@@ -1,6 +1,9 @@
AUX FBGEMM-2022.01.13-gentoo.patch 2202 BLAKE2B 541f97c2e57c13659bbd2ffc165f72062a24a93d6e5bb39e48986c0b40c9b69270798920afc4e714fa8d0d80f4ccaaf8c2d01a8d6acda6cbada8425c24c49bf5 SHA512 2c794446af33ba8ae521ce061dee76d286e61877c44d657f9436ac38c7a3a80439b25daea534ed89aeedfee02fbc031e5da70cdf446e4dee4bf2c96e91a340dc
AUX FBGEMM-2022.07.16-gcc13.patch 230 BLAKE2B f90e3efc20dee725ca1f6b93180b0176090fd314b7049d90285e7d7634af8cacc588560f593d475db73c04c9f14ae620d2ab27ee974e7a473b806254cfb5f923 SHA512 abd30f206bba3104c0b675a52c3320a251b769e9f1ea58a79de351d0d2e57e81265c554e7e8cb505014a1b5d7f7edd77d838eec33bb0fd932dfbc795b1d732e4
AUX FBGEMM-2023.02.10-test.patch 432 BLAKE2B 036f437280f186dbf970a4e3b9a8c729b0f5f6878f7daa0aa750e106b9848423a55a5a43efb1d2f5f800121a034384e7480773bf856d71517ad3daa49dc02aa4 SHA512 ba2c12e42c6f6afb4ea772ff80b5e1040b311af6457cb17d08bd254b4458d520f1a70acb2f63335ee2a06c168508d657b71adfc7ed4b697c8469cb140ed23b2f
+AUX FBGEMM-2023.11.02-gentoo.patch 2162 BLAKE2B c585ac736dc1494820e778dbba951a340b01cc60d99fe5c308bb140d42a0af8f6c05273963e0dd99a7f1ad2dc9af854702bdadf5b2682c5a959a0e742d22c772 SHA512 296d4f15e4047e98a0ccf7a3d23a9661ca2be8f4599d4dd5541f6e728f181cf58e836f09382ef2ed69792d1c9da3146a57cbce9041f7a43ab5354e641551f9fd
DIST FBGEMM-2023.02.10.tar.gz 854918 BLAKE2B 2af11baf95c1f33e1b1dd6f2a51dde2c991ff0f606402a7aaa539b7bc505c3707cafaa96d8f742c91672ec09a1f18a69f0e69c012b6db11d5297d602b8f4860c SHA512 a59d928150d674c56b5d38f73e62b5f4e2b527ea1f7ebb891ea1d3356e4183e0f469d145fca37fcb1c85f8773cf54226a8e41389fe9783474c457a7bd31846d6
+DIST FBGEMM-2023.11.02.tar.gz 895265 BLAKE2B 0f884147a86881159485680f1cb0c7b7e65bba5a98e62c38534041264f920e08a268e348e3d82ba3d246226a10f592d86dc37bce0cfa42c72dad478041a6c807 SHA512 030f27a120586240c5f80026bd033cf6fedbe1ae12a667308d33d6321f2334021d474a3625795d1f34734336b688b19c09134e10d5cc8dec86e84485de298584
EBUILD FBGEMM-2023.02.10.ebuild 1660 BLAKE2B d1cd715600325f47757a6c7e030d394e27ff2d929eaf1dba04bc5be0a2a0ccd2aeb9b2834488158e396acbdc3b67e700553dcbd05b87946d1095feb8c367deda SHA512 67c91bf0e4beb0005fe088d6ca8bde434c92d381ebd543d22e1872ab9e7778a1d49a38fd4a2ae8fc3ef09b5e9928139ce82d8dd7830b2b8fc755d00c7783096d
+EBUILD FBGEMM-2023.11.02.ebuild 1573 BLAKE2B c8039ed537e5352597f7c880a8510d13597dca99c5c9d865dd807b4db75ae255caffe74b9b43a99377a5dad788cf6b5118b55f6f2ffaf880c8bc4f70684fd8c5 SHA512 26f1e4cdf9dc8b9e52f00d3de85952de1651f7c99a109788a52dbf93316b030ea8a1ae4867fff6fda25e0e116a7fb7234fe91c6dbeb9f07acf5414d7afee495a
MISC metadata.xml 327 BLAKE2B 860b9c0ecb3b0029c855db0a0054590135f3bd6ec9dad20cdf433fc70c119354518eea50fdbb2a204eb8cc6621de23e6928a2f9ec961ac0c51fd9dae22fa8488 SHA512 3a0d5a69421a41e62ce134636025e0024010c1938ee35f7489d8d870d915a66cd526aa60d107a378dc4522ff71b7f10486e20867c8b424b1b47e458988ebff58
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,