Skip to content

Commit 2870eb8

Browse files
authored
Merge pull request #9843 from fwyzard/IB/CMSSW_15_1_X/master_ROCm_updates
ROCm: various updates
2 parents 19f6041 + 215e928 commit 2870eb8

File tree

11 files changed

+47
-62
lines changed

11 files changed

+47
-62
lines changed

cmssw-tools.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ Requires: icc
174174
Requires: icx
175175
Requires: intel-vtune
176176
Requires: ruff
177-
%{!?without_rocm:Requires: rocm rocm-rocrand}
177+
%{!?without_rocm:Requires: rocm}
178178
Requires: cmsmon-tools
179179
Requires: dip
180180
%else

fwlite-tools.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# tool is added
44
## INITENV SET CMSSW_TOOL_CONF_ROOT $FWLITE_TOOL_CONF_ROOT
55

6-
%{!?without_rocm:Requires: rocm rocm-rocrand}
6+
%{!?without_rocm:Requires: rocm}
77
%{!?without_cuda:Requires: cuda cuda-compatible-runtime}
88

99
Requires: alpaka

rocm-flags.file

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### FILE rocm-flags
2+
# define the ROCm compilation flags in a way that can be shared by SCRAM-based and regular tools
3+
4+
# build support for Instinct MI100 (gfx908), Instinct MI210/MI250X (gfx90a), Instinct MI300X (gfx942), Radeon Pro W6800 (gfx1030), Radeon Pro W7800/W7900 (gfx1100), and Radeon Pro W7600 (gfx1102)
5+
%define rocm_archs gfx908:sramecc+ gfx90a:sramecc+ gfx942:sramecc+ gfx1030 gfx1100 gfx1102
6+
7+
# LLVM/hipcc style for listing the supported ROCm compute architectures
8+
%define hipcc_flags_rocm_archs %(echo $(for ARCH in %rocm_archs; do echo "--offload-arch=$ARCH"; done))
9+
10+
# all ROCm flags
11+
%define rocm_flags %{hipcc_flags_rocm_archs}

rocm-rocrand.spec

Lines changed: 0 additions & 34 deletions
This file was deleted.

rocm.spec

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ Source19: https://%{repository}/%{repoversion}/main/rocprofiler-docs-2.0.60302.6
4545
Source20: https://%{repository}/%{repoversion}/main/rocprofiler-plugins-2.0.60302.60302-66.el%{rhel}.%{_arch}.rpm
4646
Source21: https://%{repository}/%{repoversion}/main/rocprofiler-register-0.4.0.60302-66.el%{rhel}.%{_arch}.rpm
4747
Source22: https://%{repository}/%{repoversion}/main/rocprofiler-systems-0.1.1.60302-66.el%{rhel}.%{_arch}.rpm
48-
Source23: https://%{repository}/%{repoversion}/main/rocthrust-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
49-
48+
Source23: https://%{repository}/%{repoversion}/main/hipcub-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
49+
Source24: https://%{repository}/%{repoversion}/main/rocthrust-devel-3.3.0.60302-66.el%{rhel}.%{_arch}.rpm
50+
Source25: https://%{repository}/%{repoversion}/main/hiprand-2.11.1.60302-66.el%{rhel}.%{_arch}.rpm
51+
Source26: https://%{repository}/%{repoversion}/main/hiprand-devel-2.11.1.60302-66.el%{rhel}.%{_arch}.rpm
52+
Source27: https://%{repository}/%{repoversion}/main/rocrand-3.2.0.60302-66.el%{rhel}.%{_arch}.rpm
53+
Source28: https://%{repository}/%{repoversion}/main/rocrand-devel-3.2.0.60302-66.el%{rhel}.%{_arch}.rpm
54+
Source29: https://%{repository}/%{repoversion}/main/rccl-2.21.5.60302-66.el%{rhel}.%{_arch}.rpm
55+
Source30: https://%{repository}/%{repoversion}/main/rccl-devel-2.21.5.60302-66.el%{rhel}.%{_arch}.rpm
5056

5157
# sources for rocprofiler-register
52-
Source24: git+https://github.com/ROCm/rocprofiler-register.git?obj=%{rocprofiler_register_branch}/%{rocprofiler_register_tag}&export=%{rocprofiler_register_pkg}&submodules=1&output=/%{rocprofiler_register_pkg}.tgz
58+
Source99: git+https://github.com/ROCm/rocprofiler-register.git?obj=%{rocprofiler_register_branch}/%{rocprofiler_register_tag}&export=%{rocprofiler_register_pkg}&submodules=1&output=/%{rocprofiler_register_pkg}.tgz
5359

5460
BuildRequires: gmake cmake
5561
Requires: numactl zstd fmt
@@ -60,7 +66,7 @@ AutoReq: no
6066

6167
# unpack rocprofiler-register
6268
mkdir src
63-
tar xavf %{SOURCE24} -C src
69+
tar xavf %{SOURCE99} -C src
6470

6571
%build
6672
rpm2cpio %{SOURCE0} | cpio -idmv
@@ -87,6 +93,13 @@ rpm2cpio %{SOURCE20} | cpio -idmv
8793
rpm2cpio %{SOURCE21} | cpio -idmv
8894
rpm2cpio %{SOURCE22} | cpio -idmv
8995
rpm2cpio %{SOURCE23} | cpio -idmv
96+
rpm2cpio %{SOURCE24} | cpio -idmv
97+
rpm2cpio %{SOURCE25} | cpio -idmv
98+
rpm2cpio %{SOURCE26} | cpio -idmv
99+
rpm2cpio %{SOURCE27} | cpio -idmv
100+
rpm2cpio %{SOURCE28} | cpio -idmv
101+
rpm2cpio %{SOURCE29} | cpio -idmv
102+
rpm2cpio %{SOURCE30} | cpio -idmv
90103

91104
# build rocprofiler-register
92105
sed -i -e 's|add_subdirectory(external)|find_package(fmt REQUIRED)\nadd_subdirectory(external)|' src/%{rocprofiler_register_pkg}/CMakeLists.txt

scram-tools.file/tool-env.file

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export COMPILER_WARNINGS="%{?warning_flags}"
1313
export ORACLE_ENV_ROOT=""
1414
export CUDA_FLAGS="%{nvcc_cuda_flags}"
1515
export CUDA_HOST_CXXFLAGS="%{nvcc_flags_stdcxx}"
16+
export ROCM_FLAGS="%{rocm_flags}"
1617
export LTO_FLAGS="%{?lto_build_flags}"
1718
export PGO_FLAGS="%{?pgo_build_flags}"
1819
if [ $(echo ' %requiredtools ' | grep ' python3 ' |wc -l) -gt 0 ] ; then export PYTHON3_LIB_SITE_PACKAGES ; fi

scram-tools.file/tools/rocm-rocrand/rocm-rocrand.xml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<tool name="rocm-rccl" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://rocm.docs.amd.com/projects/rccl/en/docs-@TOOL_VERSION@/"/>
3+
<use name="rocm"/>
4+
<lib name="rccl"/>
5+
</tool>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<tool name="rocm-rocrand" version="@TOOL_VERSION@" revision="1">
2+
<info url="https://rocm.docs.amd.com/projects/rocRAND/en/docs-@TOOL_VERSION@/"/>
3+
<use name="rocm"/>
4+
<lib name="hiprand"/>
5+
<lib name="rocrand"/>
6+
</tool>
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<tool name="rocm" version="@TOOL_VERSION@" revision="3">
2-
<info url="https://docs.amd.com/"/>
1+
<tool name="rocm" version="@TOOL_VERSION@" revision="4">
2+
<info url="https://rocm.docs.amd.com/en/docs-@TOOL_VERSION@/"/>
33
<lib name="amdhip64"/>
44
<lib name="hsa-runtime64"/>
55
<lib name="rocm_smi64"/>
@@ -11,12 +11,7 @@
1111
<environment name="INCLUDE" default="$ROCM_BASE/include"/>
1212
</client>
1313
<flags CPPDEFINES="__HIP_PLATFORM_HCC__ __HIP_PLATFORM_AMD__"/>
14-
<flags ROCM_FLAGS="--offload-arch=gfx908:sramecc+:xnack-"/> <!-- Instinct MI100 -->
15-
<flags ROCM_FLAGS="--offload-arch=gfx90a:sramecc+:xnack-"/> <!-- Instinct MI210/MI250 -->
16-
<flags ROCM_FLAGS="--offload-arch=gfx942:sramecc+:xnack-"/> <!-- Instinct MI300X -->
17-
<flags ROCM_FLAGS="--offload-arch=gfx1030"/> <!-- Radeon Pro W6800 -->
18-
<flags ROCM_FLAGS="--offload-arch=gfx1100"/> <!-- Radeon Pro W7800/W7900 -->
19-
<flags ROCM_FLAGS="--offload-arch=gfx1102"/> <!-- Radeon Pro W7600 -->
14+
<flags ROCM_FLAGS="@ROCM_FLAGS@"/>
2015
<flags ROCM_FLAGS="-fgpu-rdc --target=@COMPILER_HOST@ --gcc-toolchain=$(COMPILER_PATH)"/>
2116
%if "%{default_microarch_name}"
2217
%if "%{default_microarch_name}" != "%{min_microarch_name}"
@@ -28,5 +23,6 @@
2823
<flags SYSTEM_INCLUDE="1"/>
2924
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path" join="1"/>
3025
<runtime name="PATH" value="$ROCM_BASE/bin" type="path"/>
26+
<runtime name="HSA_XNACK" value="1"/>
3127
<use name="fmt"/>
3228
</tool>

0 commit comments

Comments
 (0)