Compare commits

4 Commits

Author SHA1 Message Date
8e4507d446 Add Fedora copyright
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-27 13:26:33 -07:00
7158180a3f Simplify file removal
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-25 14:55:35 -07:00
fa701984ee Remove changelog
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-25 08:35:08 -07:00
32c3627516 Fine tune parallel jobs
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-18 14:10:19 -07:00
2 changed files with 66 additions and 8 deletions

View File

@@ -1,4 +0,0 @@
* Mon Nov 25 2024 Tom Rix <Tom.Rix@amd.com> - 6.2.1-100
- Restart manual changelog
- Reduce build to gfx1100
- Build for TW

View File

@@ -1,3 +1,24 @@
#
# Copyright Fedora Project Authors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
%if 0%{?suse_version}
%global rccl_name librccl1
%else
@@ -49,7 +70,7 @@
Name: %{rccl_name}
Version: %{rocm_version}
Release: 4%{?dist}
Release: 7%{?dist}
Summary: ROCm Communication Collectives Library
Url: https://github.com/ROCm/rccl
@@ -159,6 +180,40 @@ sed -i '/#include <map.*/a#include <iomanip>' test/common/TestBed.hpp
# Convert the c++14 to c++17
sed -i -e 's@set(CMAKE_CXX_STANDARD 14)@set(CMAKE_CXX_STANDARD 17)@' CMakeLists.txt
# RCCL uses -parallel-jobs for both compiling and linking
# compiling is set to 12, which may be more than the cores on the build machine.
# linking is set by reserving 16GB pre thread, can be too little.
# Use our own heuristics here
# Real cores, No hyperthreading
COMPILE_JOBS=`cat /proc/cpuinfo | grep -m 1 'cpu cores' | awk '{ print $4 }'`
if [ ${COMPILE_JOBS}x = x ]; then
COMPILE_JOBS=1
fi
# Try again..
if [ ${COMPILE_JOBS} = 1 ]; then
COMPILE_JOBS=`lscpu | grep '^CPU(s)' | awk '{ print $2 }'`
if [ ${COMPILE_JOBS}x = x ]; then
COMPILE_JOBS=4
fi
fi
# Take into account memmory usage per core, do not thrash real memory
# inflate this to prevent competing with normal compile jobs
BUILD_MEM=16
MEM_KB=0
MEM_KB=`cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'`
MEM_MB=`eval "expr ${MEM_KB} / 1024"`
MEM_GB=`eval "expr ${MEM_MB} / 1024"`
COMPILE_JOBS_MEM=`eval "expr 1 + ${MEM_GB} / ${BUILD_MEM}"`
if [ "$COMPILE_JOBS_MEM" -lt "$COMPILE_JOBS" ]; then
COMPILE_JOBS=$COMPILE_JOBS_MEM
fi
LINK_MEM=24
LINK_JOBS=`eval "expr 1 + ${MEM_GB} / ${LINK_MEM}"`
sed -i -e "s@rccl PRIVATE -parallel-jobs=12@rccl PRIVATE -parallel-jobs=${COMPILE_JOBS}@" CMakeLists.txt
sed -i -e "s@-parallel-jobs=\${num_linker_jobs}@-parallel-jobs=${LINK_JOBS}@" CMakeLists.txt
%build
%cmake \
-DAMDGPU_TARGETS=%{rocm_gpu_list_rccl} \
@@ -181,9 +236,7 @@ sed -i -e 's@set(CMAKE_CXX_STANDARD 14)@set(CMAKE_CXX_STANDARD 17)@' CMakeList
%install
%cmake_install
if [ -f %{buildroot}%{_prefix}/share/doc/rccl/LICENSE.txt ]; then
rm %{buildroot}%{_prefix}/share/doc/rccl/LICENSE.txt
fi
rm -f %{buildroot}%{_prefix}/share/doc/rccl/LICENSE.txt
%files
%license LICENSE.txt
@@ -210,6 +263,15 @@ fi
%endif
%changelog
* Wed Aug 27 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-7
- Add Fedora copyright
* Mon Aug 25 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-6
- Simplify file removal
* Mon Aug 18 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-5
- Fine tune parallel jobs
* Thu Aug 14 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-4
- build --with test on SUSE
- Remove multibuild file generation