From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 27449158042 for ; Thu, 14 Nov 2024 20:16:58 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6AA6AE0930; Thu, 14 Nov 2024 20:16:57 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4CD37E0930 for ; Thu, 14 Nov 2024 20:16:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5E152335D0F for ; Thu, 14 Nov 2024 20:16:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EDB581915 for ; Thu, 14 Nov 2024 20:16:54 +0000 (UTC) From: "Alfredo Tupone" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alfredo Tupone" Message-ID: <1731615205.ee206a9be4541beb3e60a8f3cbccb00ab0ac9e46.tupone@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/caffe2/files/, sci-libs/caffe2/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/caffe2/caffe2-2.5.1-r1.ebuild sci-libs/caffe2/caffe2-2.5.1.ebuild sci-libs/caffe2/files/caffe2-2.5.1-cpp-httplib.patch X-VCS-Directories: sci-libs/caffe2/files/ sci-libs/caffe2/ X-VCS-Committer: tupone X-VCS-Committer-Name: Alfredo Tupone X-VCS-Revision: ee206a9be4541beb3e60a8f3cbccb00ab0ac9e46 X-VCS-Branch: master Date: Thu, 14 Nov 2024 20:16:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 93dd834d-9e4d-4994-ac3f-f65d12bd19c0 X-Archives-Hash: 66b90f73f41bf5dc6ce7fe37bab90ce9 commit: ee206a9be4541beb3e60a8f3cbccb00ab0ac9e46 Author: Alfredo Tupone gentoo org> AuthorDate: Thu Nov 14 20:07:11 2024 +0000 Commit: Alfredo Tupone gentoo org> CommitDate: Thu Nov 14 20:13:25 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee206a9b sci-libs/caffe2: fix xnnpack use, add deps and other Closes: https://bugs.gentoo.org/943501 Signed-off-by: Alfredo Tupone gentoo.org> ...{caffe2-2.5.1.ebuild => caffe2-2.5.1-r1.ebuild} | 42 +++++++++++++++------- .../caffe2/files/caffe2-2.5.1-cpp-httplib.patch | 13 ------- 2 files changed, 29 insertions(+), 26 deletions(-) diff --git a/sci-libs/caffe2/caffe2-2.5.1.ebuild b/sci-libs/caffe2/caffe2-2.5.1-r1.ebuild similarity index 90% rename from sci-libs/caffe2/caffe2-2.5.1.ebuild rename to sci-libs/caffe2/caffe2-2.5.1-r1.ebuild index 81e3a916f3b3..393000c79567 100644 --- a/sci-libs/caffe2/caffe2-2.5.1.ebuild +++ b/sci-libs/caffe2/caffe2-2.5.1-r1.ebuild @@ -38,9 +38,10 @@ RDEPEND=" dev-cpp/abseil-cpp:= dev-cpp/gflags:= >=dev-cpp/glog-0.5.0 + dev-cpp/nlohmann_json + dev-cpp/opentelemetry-cpp dev-libs/cpuinfo dev-libs/libfmt - dev-cpp/opentelemetry-cpp dev-libs/protobuf:= dev-libs/pthreadpool dev-libs/sleef[cpu_flags_x86_avx512f(+),cpu_flags_x86_avx(+)] @@ -95,6 +96,7 @@ RDEPEND=" mkl? ( sci-libs/mkl ) openblas? ( sci-libs/openblas ) " + DEPEND=" ${RDEPEND} cuda? ( >=dev-libs/cutlass-3.4.1 ) @@ -118,7 +120,7 @@ PATCHES=( "${FILESDIR}"/${P}-fix-functorch-install.patch "${FILESDIR}"/${P}-cudnn_include_fix.patch "${FILESDIR}"/${P}-gentoo.patch - "${FILESDIR}"/${P}-cpp-httplib.patch + "${FILESDIR}"/${PN}-2.4.0-cpp-httplib.patch "${FILESDIR}"/${P}-glog-0.6.0.patch ) @@ -132,6 +134,7 @@ src_prepare() { cmake/Dependencies.cmake \ torch/CMakeLists.txt \ || die + # Drop third_party from CMake tree sed -i \ -e '/add_subdirectory.*third_party/d' \ @@ -140,10 +143,12 @@ src_prepare() { cmake/ProtoBuf.cmake \ aten/src/ATen/CMakeLists.txt \ || die + cmake_src_prepare pushd torch/csrc/jit/serialization || die flatc --cpp --gen-mutable --scoped-enums mobile_bytecode.fbs || die popd + # prefixify the hardcoded paths, after all patches are applied hprefixify \ aten/CMakeLists.txt \ @@ -186,6 +191,7 @@ src_configure() { fi local mycmakeargs=( + -DBUILD_CUSTOM_PROTOBUF=OFF -DLIBSHM_INSTALL_LIB_SUBDIR="${EPREFIX}"/usr/$(get_libdir) -DPython_EXECUTABLE="${PYTHON}" -DTORCH_INSTALL_LIB_DIR="${EPREFIX}"/usr/$(get_libdir) @@ -213,7 +219,18 @@ src_configure() { -DUSE_PYTORCH_QNNPACK=$(usex qnnpack) -DUSE_PYTORCH_METAL=OFF -DUSE_ROCM=$(usex rocm) - -DUSE_SYSTEM_LIBS=ON + -DUSE_SYSTEM_CPUINFO=ON + -DUSE_SYSTEM_EIGEN_INSTALL=ON + -DUSE_SYSTEM_FP16=ON + -DUSE_SYSTEM_FXDIV=ON + -DUSE_SYSTEM_GLOO=ON + -DUSE_SYSTEM_ONNX=ON + -DUSE_SYSTEM_PSIMD=ON + -DUSE_SYSTEM_PSIMD=ON + -DUSE_SYSTEM_PTHREADPOOL=ON + -DUSE_SYSTEM_PYBIND11=ON + -DUSE_SYSTEM_SLEEF=ON + -DUSE_SYSTEM_XNNPACK=$(usex xnnpack) -DUSE_TENSORPIPE=$(usex distributed) -DUSE_UCC=OFF -DUSE_VALGRIND=OFF @@ -286,20 +303,19 @@ src_install() { cp torch/version.py python/torch/ || die python_domodule python/torch - dodir $(python_get_sitedir)/torch/bin - dodir $(python_get_sitedir)/torch/lib - dodir $(python_get_sitedir)/torch/include + mkdir "${D}"$(python_get_sitedir)/torch/bin || die + mkdir "${D}"$(python_get_sitedir)/torch/lib || die + mkdir "${D}"$(python_get_sitedir)/torch/include || die ln -s ../../../../../include/torch \ "${D}$(python_get_sitedir)"/torch/include/torch || die # bug 923269 + mv "${D}"/usr/bin/torch_shm_manager \ + "${D}"/$(python_get_sitedir)/torch/bin/ || die - mv "${ED}"/usr/bin/torch_shm_manager \ - "${ED}"/$(python_get_sitedir)/torch/bin/ || die - - mv "${ED}"/usr/$(get_libdir)/libtorch_global_deps.so \ - "${ED}"/$(python_get_sitedir)/torch/lib/ || die + mv "${D}"/usr/$(get_libdir)/libtorch_global_deps.so \ + "${D}"/$(python_get_sitedir)/torch/lib/ || die - mv "${ED}"/usr/lib/libc10*.so \ - "${ED}"/usr/$(get_libdir)/ || die + mv "${D}"/usr/lib/libc10*.so \ + "${D}"/usr/$(get_libdir)/ || die } diff --git a/sci-libs/caffe2/files/caffe2-2.5.1-cpp-httplib.patch b/sci-libs/caffe2/files/caffe2-2.5.1-cpp-httplib.patch deleted file mode 100644 index 5d684a4a4738..000000000000 --- a/sci-libs/caffe2/files/caffe2-2.5.1-cpp-httplib.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/torch/lib/libshm/CMakeLists.txt 2024-09-04 06:09:51.943752841 +0200 -+++ b/torch/lib/libshm/CMakeLists.txt 2024-09-04 06:10:52.243821438 +0200 -@@ -24,6 +24,10 @@ - CXX_STANDARD 17) - target_link_libraries(shm PRIVATE ${TORCH_CPU_LIB}) - -+if (USE_DISTRIBUTED) -+ target_link_libraries(shm PRIVATE cpp-httplib) -+endif() -+ - if(UNIX AND NOT APPLE) - include(CheckLibraryExists) - find_package(Threads REQUIRED)