From 9b434b5d56ba1aa4482a39c7df2a71ca5d901f8b Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Mon, 18 Apr 2022 22:22:36 +0200 Subject: [PATCH 1/2] Add ROCm 5.0.2 for x86_64 For more information, see the documentation at: - ROCm 5.0: https://docs.amd.com/category/ROCm_v5.0 - ROCm 5.0.2: https://docs.amd.com/category/ROCm_v5.0.2 --- cmssw-tool-conf.spec | 1 + rocm.spec | 87 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 rocm.spec diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 3e64add7641..075361c7e13 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -166,6 +166,7 @@ Requires: oracle Requires: icc Requires: icx Requires: intel-vtune +Requires: rocm Requires: cmsmon-tools Requires: dip %else diff --git a/rocm.spec b/rocm.spec new file mode 100644 index 00000000000..ec929bac94e --- /dev/null +++ b/rocm.spec @@ -0,0 +1,87 @@ +### RPM external rocm 5.0.2 +## NOCOMPILER +Source: none +Provides: libamd_comgr.so.2()(64bit) +Provides: libhsa-runtime64.so.1()(64bit) +Provides: librocm-core.so.1()(64bit) +Provides: librocm_smi64.so.5()(64bit) + +%prep + +%build + +%install +OSDIR=/cvmfs/patatrack.cern.ch/externals/%{_arch}/rhel%{rhel} +if ! [ -d $OSDIR ]; then + OSDIR=/cvmfs/patatrack.cern.ch/externals/%{_arch}/unknown +fi +BASEDIR=${OSDIR}/amd/%{n}-%{realversion} + +# symlink individual files from ${BASEDIR}/bin/ +mkdir %{i}/bin +test -d ${BASEDIR}/bin +test -e ${BASEDIR}/bin/hipcc +ln -s ${BASEDIR}/bin/* %{i}/bin/ +# remove the OpenCL extra files +rm -f %{i}/bin/clang-ocl +# remove the OpenMP extra files +rm -f %{i}/bin/{aompcc,gputable.txt,mygpu,mymcpu} +# remove the MIGraphX tools +rm -f %{i}/bin/migraphx-driver + +# ROCm/HIP core tools +DIRECTORIES="amdgcn hip hipcub hsa hsa-amd-aqlprofile include lib lib64 llvm rocthrust share" + +# rocm-smi +DIRECTORIES+=" oam rocm_smi" + +# hipBLAS / rocBLAS +DIRECTORIES+=" hipblas rocblas" + +# hipSOLVER / rocSOLVER +DIRECTORIES+=" hipsolver rocsolver" + +# hipSPARSE / rocSPARSE +DIRECTORIES+=" hipsparse rocsparse" + +# hipFFT / rocFFT +DIRECTORIES+=" hipfft rocfft" + +# hipRAND / rocRAND +DIRECTORIES+=" hiprand rocrand" + +# ROCm Parallel Primitives (rocPRIM) +DIRECTORIES+=" rocprim" + +# ROCm Tracer Callback/Activity Library (rocTRACER) and profiler library (ROC-profiler) +DIRECTORIES+=" rocprofiler roctracer" + +# Asynchronous Task and Memory Interface (ATMI) +#DIRECTORIES+=" atmi" + +# OpenCL support +#DIRECTORIES+=" opencl" + +# ROCm Communication Collectives Library (RCCL) +#DIRECTORIES+=" rccl" + +# iterative sparse solvers for ROCm platform (rocALUTION) +#DIRECTORIES+=" rocalution" + +# Machine Intelligence Libraries +#DIRECTORIES+=" miopen miopengemm mivisionx" + +# HIP Fortran interface (hipfort) +#DIRECTORIES+=" hipfort" + +# ROCm Data Center Tool (RDC) +#DIRECTORIES+=" rdc" + +# ROCm Validation Suite (RVS) +#DIRECTORIES+=" rvs" + +# symlink the other directories from ${BASEDIR}/ +for D in ${DIRECTORIES}; do + ln -s ${BASEDIR}/${D} %{i}/ + test -L %{i}/${D} +done From 1de8c41db5123721ebfef731f1fd0ad81fb96ba0 Mon Sep 17 00:00:00 2001 From: Andrea Bocci Date: Tue, 19 Apr 2022 23:50:53 +0200 Subject: [PATCH 2/2] Add scram tool files for HIP/ROCm and hipRAND/rocRAND --- scram-tools.file/tools/rocm/rocm-rocrand.xml | 12 +++++++ scram-tools.file/tools/rocm/rocm.xml | 36 ++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 scram-tools.file/tools/rocm/rocm-rocrand.xml create mode 100644 scram-tools.file/tools/rocm/rocm.xml diff --git a/scram-tools.file/tools/rocm/rocm-rocrand.xml b/scram-tools.file/tools/rocm/rocm-rocrand.xml new file mode 100644 index 00000000000..64e0be3e254 --- /dev/null +++ b/scram-tools.file/tools/rocm/rocm-rocrand.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/scram-tools.file/tools/rocm/rocm.xml b/scram-tools.file/tools/rocm/rocm.xml new file mode 100644 index 00000000000..8a3aabd23e2 --- /dev/null +++ b/scram-tools.file/tools/rocm/rocm.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +