[gentoo-commits] repo/gentoo:master commit in: dev-libs/rccl/, dev-libs/rccl/files/

2022-09-21 Thread Benda XU
commit: 9798f1a204499b1c54a58aeaa8fbc962c20590b9
Author: Yiyang Wu  gmail  com>
AuthorDate: Wed Aug  3 13:32:40 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Thu Sep 22 01:07:56 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9798f1a2

dev-libs/rccl: add 5.1.3, using rocm.eclass

relax SLOT dependency on dev-util/hip, since rccl is also part of high
level ROCm libraries.

This unlocks the exact SLOT dependency of the lower and higher level
ROCm tools to make version bumps easier.

Signed-off-by: Yiyang Wu  gmail.com>
Signed-off-by: Benda Xu  gentoo.org>

 dev-libs/rccl/Manifest |  1 +
 .../rccl/files/rccl-5.1.3-remove-chrpath.patch | 32 ++
 dev-libs/rccl/rccl-5.1.3.ebuild| 51 ++
 3 files changed, 84 insertions(+)

diff --git a/dev-libs/rccl/Manifest b/dev-libs/rccl/Manifest
index b50fab6d5c7b..801fbb23f13b 100644
--- a/dev-libs/rccl/Manifest
+++ b/dev-libs/rccl/Manifest
@@ -1,3 +1,4 @@
 DIST rccl-4.0.0.tar.gz 741814 BLAKE2B 
c20178e45fb7787ef7f5e20326f91f11a1b2a575277b5f28591b0be6efa6730c3509b11255372648f1df50e33b5e593dbe9c3334c5001f39423fc70acfa49d07
 SHA512 
d25754895d7b5695e46031642c2550cf2b6b5c42628d8381a23d6d1a48699a14a4fdf842205a14b96bdd1339341f9e558492ef9366a63036d8a8a7011d2c1b05
 DIST rccl-4.3.0.tar.gz 836631 BLAKE2B 
c7fede9cf92d3e75b79da2874c0a1e45c5fd4ad9d24b11c9870e9fdef8d571a286cbf54ae0a033f2aec3d21b06cafc2b1c097aaf87ecd628f0c33e9267103be1
 SHA512 
1a27e6441955f01c853861f83743da2fc9597978c3ff99f238734d4bafb1e277d626811b72c6a12563d69b2b8265960b8a2566df618921557837035b92993f0e
 DIST rccl-5.0.2.tar.gz 888060 BLAKE2B 
f75d83b0f52487b4f7a2d30763ae4fb0d216fc353e62de981057cb855d5b26c7b846622c76330029c1ed5bd195695308bcef5c67d39526032dfee254084a40f7
 SHA512 
ee62720926008f67fcae0fc9a6ace23ca593a156f74fce6012ff2a6fcffdc2e2dc70d48cd3830b217e68449ba3e677b4005d20bd4554aeccf17cba56713cb00f
+DIST rccl-5.1.3.tar.gz 908274 BLAKE2B 
46bff7b6e3d60d5884ccd7e19c54b2f47f90a337a8fdc6dca1a3cfee147e3652e1f912642cc134d4a82bf8daabd9f1391edff139d0517ab1078bd3d9650481d7
 SHA512 
20deb27c7ef3e6b6b73409950ac0d51286b4634f7002ce36a9a02cdd1d5b1f2db51f6decf773af83364c94f58cc96837da25299f5f5494fc15d8559a1b3c7fcc

diff --git a/dev-libs/rccl/files/rccl-5.1.3-remove-chrpath.patch 
b/dev-libs/rccl/files/rccl-5.1.3-remove-chrpath.patch
new file mode 100644
index ..26bad572c7d8
--- /dev/null
+++ b/dev-libs/rccl/files/rccl-5.1.3-remove-chrpath.patch
@@ -0,0 +1,32 @@
+Manually chrpath not needed in CMakeLists since CMAKE_SKIP_RPATH=On
+So chrpath dependency is not needed
+===
+--- rccl-rocm-5.1.3.orig/test/CMakeLists.txt
 rccl-rocm-5.1.3/test/CMakeLists.txt
+@@ -5,11 +5,6 @@ if(BUILD_TESTS)
+ 
+   message("Going to build unit tests (Installed in /test/UnitTests)")
+ 
+-  find_program(CHRPATH chrpath)
+-  if(NOT CHRPATH)
+-  message(FATAL_ERROR "chrpath is required for UnitTests. Please install 
(e.g. sudo apt-get install chrpath)")
+-  endif()
+-
+   include_directories(${GTEST_INCLUDE_DIRS})
+ 
+   if(BUILD_ALLREDUCE_ONLY)
+@@ -88,14 +83,6 @@ if(BUILD_TESTS)
+   # HIPCC adds /opt/rocm/lib as RPATH, even though the install process is 
supposed to
+   # remove RPATH.  It also occurs before any user-specified rpath, which 
effectively overrides the user rpath.
+   #  As a work-around, set the correct RPATH for the unit test executable as 
a post-install step
+-  if (CMAKE_INSTALL_PREFIX MATCHES "${ROCM_PATH}")
+-# install_prefix/CMAKE_INSTALL_PREFIX was not explicitly specified, so 
look in build/release
+-add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r 
${CMAKE_BINARY_DIR}:${ROCM_PATH}/lib ${CMAKE_BINARY_DIR}/test/UnitTests)
+-add_custom_command( TARGET UnitTestsMultiProcess POST_BUILD COMMAND 
chrpath ARGS -r ${CMAKE_BINARY_DIR}:${ROCM_PATH}/lib 
${CMAKE_BINARY_DIR}/test/UnitTestsMultiProcess)
+-  else()
+-add_custom_command( TARGET UnitTests POST_BUILD COMMAND chrpath ARGS -r 
${CMAKE_INSTALL_PREFIX}/lib:${ROCM_PATH}/lib 
${CMAKE_INSTALL_PREFIX}/test/UnitTests)
+-add_custom_command( TARGET UnitTestsMultiProcess POST_BUILD COMMAND 
chrpath ARGS -r ${CMAKE_INSTALL_PREFIX}/lib:${ROCM_PATH}/lib 
${CMAKE_INSTALL_PREFIX}/test/UnitTestsMultiProcess)
+-  endif()
+ else()
+   message("Not building unit tests")
+ endif()

diff --git a/dev-libs/rccl/rccl-5.1.3.ebuild b/dev-libs/rccl/rccl-5.1.3.ebuild
new file mode 100644
index ..b7256c9d8ed4
--- /dev/null
+++ b/dev-libs/rccl/rccl-5.1.3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ROCM_VERSION=${PV}
+
+inherit cmake edo rocm
+
+DESCRIPTION="ROCm Communication Collectives Library (RCCL)"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rccl;
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-${PV}.tar.gz
 -> 

[gentoo-commits] repo/gentoo:master commit in: dev-libs/rccl/, dev-libs/rccl/files/

2022-05-01 Thread Benda XU
commit: 3b89366daa39042e92cf3a2577c3a3328070f573
Author: Benda Xu  gentoo  org>
AuthorDate: Mon May  2 02:56:49 2022 +
Commit: Benda XU  gentoo  org>
CommitDate: Mon May  2 02:56:49 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b89366d

dev-libs/rccl: bump to 5.0.2.

Closes: https://bugs.gentoo.org/831662
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Benda Xu  gentoo.org>

 dev-libs/rccl/Manifest |  1 +
 .../files/rccl-5.0.2-change_install_location.patch | 31 
 dev-libs/rccl/rccl-5.0.2.ebuild| 41 ++
 3 files changed, 73 insertions(+)

diff --git a/dev-libs/rccl/Manifest b/dev-libs/rccl/Manifest
index ef9abc099a66..b50fab6d5c7b 100644
--- a/dev-libs/rccl/Manifest
+++ b/dev-libs/rccl/Manifest
@@ -1,2 +1,3 @@
 DIST rccl-4.0.0.tar.gz 741814 BLAKE2B 
c20178e45fb7787ef7f5e20326f91f11a1b2a575277b5f28591b0be6efa6730c3509b11255372648f1df50e33b5e593dbe9c3334c5001f39423fc70acfa49d07
 SHA512 
d25754895d7b5695e46031642c2550cf2b6b5c42628d8381a23d6d1a48699a14a4fdf842205a14b96bdd1339341f9e558492ef9366a63036d8a8a7011d2c1b05
 DIST rccl-4.3.0.tar.gz 836631 BLAKE2B 
c7fede9cf92d3e75b79da2874c0a1e45c5fd4ad9d24b11c9870e9fdef8d571a286cbf54ae0a033f2aec3d21b06cafc2b1c097aaf87ecd628f0c33e9267103be1
 SHA512 
1a27e6441955f01c853861f83743da2fc9597978c3ff99f238734d4bafb1e277d626811b72c6a12563d69b2b8265960b8a2566df618921557837035b92993f0e
+DIST rccl-5.0.2.tar.gz 888060 BLAKE2B 
f75d83b0f52487b4f7a2d30763ae4fb0d216fc353e62de981057cb855d5b26c7b846622c76330029c1ed5bd195695308bcef5c67d39526032dfee254084a40f7
 SHA512 
ee62720926008f67fcae0fc9a6ace23ca593a156f74fce6012ff2a6fcffdc2e2dc70d48cd3830b217e68449ba3e677b4005d20bd4554aeccf17cba56713cb00f

diff --git a/dev-libs/rccl/files/rccl-5.0.2-change_install_location.patch 
b/dev-libs/rccl/files/rccl-5.0.2-change_install_location.patch
new file mode 100644
index ..11e3fea312de
--- /dev/null
+++ b/dev-libs/rccl/files/rccl-5.0.2-change_install_location.patch
@@ -0,0 +1,31 @@
+Index: rccl-rocm-5.0.2/CMakeLists.txt
+===
+--- rccl-rocm-5.0.2.orig/CMakeLists.txt
 rccl-rocm-5.0.2/CMakeLists.txt
+@@ -268,16 +268,12 @@ target_link_libraries(rccl INTERFACE hip
+ rocm_set_soversion(rccl "1.0")
+ 
+ rocm_install_targets(TARGETS
+- rccl
+- PREFIX
+  rccl)
+ rocm_install(FILES ${PROJECT_BINARY_DIR}/rccl.h
+-DESTINATION rccl/${CMAKE_INSTALL_INCLUDEDIR})
++DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ 
+ rocm_export_targets(NAMESPACE
+ roc::
+-PREFIX
+-rccl
+ TARGETS
+ rccl
+ DEPENDS
+@@ -329,8 +325,6 @@ rocm_create_package(
+   "RCCL Maintainer "
+   LDCONFIG)
+ 
+-rocm_install_symlink_subdir(rccl)
+-
+ if(BUILD_TESTS)
+   add_subdirectory(test)
+ endif()

diff --git a/dev-libs/rccl/rccl-5.0.2.ebuild b/dev-libs/rccl/rccl-5.0.2.ebuild
new file mode 100644
index ..045b52b33b0f
--- /dev/null
+++ b/dev-libs/rccl/rccl-5.0.2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="ROCm Communication Collectives Library (RCCL)"
+HOMEPAGE="https://github.com/ROCmSoftwarePlatform/rccl;
+SRC_URI="https://github.com/ROCmSoftwarePlatform/rccl/archive/rocm-${PV}.tar.gz
 -> rccl-${PV}.tar.gz"
+
+LICENSE="BSD"
+KEYWORDS="~amd64"
+SLOT="0/$(ver_cut 1-2)"
+
+RDEPEND="dev-util/hip:${SLOT}"
+DEPEND="${RDEPEND}"
+BDEPEND=">=dev-util/cmake-3.22
+   >=dev-util/rocm-cmake-5.0.2-r1"
+
+S="${WORKDIR}/rccl-rocm-${PV}"
+
+PATCHES=(
+   "${FILESDIR}/rccl-5.0.2-change_install_location.patch"
+)
+
+src_configure() {
+   addwrite /dev/kfd
+   addpredict /dev/dri/
+
+   export DEVICE_LIB_PATH="${EPREFIX}/usr/lib/amdgcn/bitcode/"
+   export CXX=hipcc
+
+   local mycmakeargs=(
+   -DBUILD_TESTS=OFF
+   -Wno-dev
+   ${AMDGPU_TARGETS+-DAMDGPU_TARGETS="${AMDGPU_TARGETS}"}
+   )
+
+   cmake_src_configure
+}