diff --git a/cmssw-tool-conf.spec b/cmssw-tool-conf.spec index 25b2ada4c17..ee835fd9970 100644 --- a/cmssw-tool-conf.spec +++ b/cmssw-tool-conf.spec @@ -1,4 +1,4 @@ -### RPM cms cmssw-tool-conf 53.0 +### RPM cms cmssw-tool-conf 53.1 # With cmsBuild, change the above version only when a new tool is added ## INSTALL_DEPENDENCIES cmsLHEtoEOSManager gcc-fixincludes cmssw-osenv cms-git-tools SCRAMV2 @@ -163,6 +163,7 @@ Requires: icc Requires: icx Requires: intel-vtune Requires: rocm +Requires: rocm-rocrand Requires: cmsmon-tools Requires: dip %else diff --git a/fakesystem.spec b/fakesystem.spec index cfd7a4821e7..16f4352d735 100644 --- a/fakesystem.spec +++ b/fakesystem.spec @@ -1,5 +1,5 @@ ### RPM cms fakesystem 1.0 -## REVISION 1012 +## REVISION 1013 ## NOCOMPILER ## NO_VERSION_SUFFIX @@ -103,10 +103,21 @@ Provides: perl(File::stat) Provides: perl(Time::localtime) Provides: perl(sort) -##### -# ROCM -##### +################################# +# Needed by ROCm +################################# Provides: libamdhip64.so.5(hip_5.3)(64bit) +Provides: libdrm.so.2()(64bit) +Provides: libdrm_amdgpu.so.1()(64bit) +Provides: perl(File::Which) +Provides: perl(URI::Encode) + +################################# +# Needed by ROCm on EL9 +################################# +Provides: perl(FindBin) +Provides: perl(Hash::Util) +Provides: perl(Sys::Hostname) Provides: /bin/csh Provides: /bin/tcsh diff --git a/rocm-rocrand.spec b/rocm-rocrand.spec new file mode 100644 index 00000000000..064fd307852 --- /dev/null +++ b/rocm-rocrand.spec @@ -0,0 +1,29 @@ +### RPM external rocm-rocrand 5.4.3 +## NOCOMPILER + +%if "%{rhel}" == "7" +# allow rpm2cpio dependency on the bootstrap bundle +%undefine drop_bootstrap_lib +%define drop_bootstrap_lib true +%define repository repo.radeon.com/rocm/yum +%else +%define repository repo.radeon.com/rocm/rhel%{rhel} +%endif + +Source0: https://%{repository}/%{realversion}/main/rocrand-2.10.9.50403-121.el%{rhel}.%{_arch}.rpm +Source1: https://%{repository}/%{realversion}/main/rocrand-devel-2.10.9.50403-121.el%{rhel}.%{_arch}.rpm +Requires: rocm + +%prep + +%build +rpm2cpio %{SOURCE0} | cpio -idmv +rpm2cpio %{SOURCE1} | cpio -idmv + +%install +rmdir %{i} +mv opt/rocm-%{realversion} %{i} +rm -rf opt +rm -rf usr + +%post diff --git a/rocm.spec b/rocm.spec index 7a4352efaac..60b217ebd03 100644 --- a/rocm.spec +++ b/rocm.spec @@ -1,79 +1,77 @@ ### RPM external rocm 5.4.3 ## 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) -Provides: libamdhip64.so.5()(64bit) -Provides: libamdhip64.so.5(hip_4.2)(64bit) -# This rpm packages only symlinks to an installation that is already on CVMFS. -# Configure pkgtools to keep the static libraries, to avoid actually trying to -# delete them from CVMFS. -%define keep_archives true +%if "%{rhel}" == "7" +# allow rpm2cpio dependency on the bootstrap bundle +%undefine drop_bootstrap_lib +%define drop_bootstrap_lib true +%define repository repo.radeon.com/rocm/yum +%else +%define repository repo.radeon.com/rocm/rhel%{rhel} +%endif + +Source0: https://%{repository}/%{realversion}/main/comgr-2.4.0.50403-121.el%{rhel}.%{_arch}.rpm +Source1: https://%{repository}/%{realversion}/main/hip-devel-5.4.22804.50403-121.el%{rhel}.%{_arch}.rpm +Source2: https://%{repository}/%{realversion}/main/hip-runtime-amd-5.4.22804.50403-121.el%{rhel}.%{_arch}.rpm +Source3: https://%{repository}/%{realversion}/main/hsa-rocr-1.7.0.50403-121.el%{rhel}.%{_arch}.rpm +Source4: https://%{repository}/%{realversion}/main/rocm-core-5.4.3.50403-121.el%{rhel}.%{_arch}.rpm +Source5: https://%{repository}/%{realversion}/main/rocm-dbgapi-0.68.0.50403-121.el%{rhel}.%{_arch}.rpm +Source6: https://%{repository}/%{realversion}/main/rocm-device-libs-1.0.0.50403-121.el%{rhel}.%{_arch}.rpm +Source7: https://%{repository}/%{realversion}/main/rocm-llvm-15.0.0.23045.50403-121.el%{rhel}.%{_arch}.rpm +Source8: https://%{repository}/%{realversion}/main/rocm-smi-lib-5.0.0.50403-121.el%{rhel}.%{_arch}.rpm +Source9: https://%{repository}/%{realversion}/main/rocminfo-1.0.0.50403-121.el%{rhel}.%{_arch}.rpm +Requires: numactl +Requires: python3 %prep %build +rpm2cpio %{SOURCE0} | cpio -idmv +rpm2cpio %{SOURCE1} | cpio -idmv +rpm2cpio %{SOURCE2} | cpio -idmv +rpm2cpio %{SOURCE3} | cpio -idmv +rpm2cpio %{SOURCE4} | cpio -idmv +rpm2cpio %{SOURCE5} | cpio -idmv +rpm2cpio %{SOURCE6} | cpio -idmv +rpm2cpio %{SOURCE7} | cpio -idmv +rpm2cpio %{SOURCE8} | cpio -idmv +rpm2cpio %{SOURCE9} | cpio -idmv %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,clinfo} -# Remove the OpenMP extra files -rm -f %{i}/bin/{aompcc,mygpu,mymcpu} -# Remove the Fortran files -rm -f %{i}/bin/hipfc -# Remove the MI tools -rm -f %{i}/bin/{MIOpenDriver,migraphx-driver,runvx} -# Remove the datacenter tools and validation suite binaries -rm -f %{i}/bin/{rdcd,rdci,rvs} -# Remove some of the prebuilt samples -rm -f %{i}/bin/{sgemmv,simple_dlrm,simple_gemm} - -# ROCm/HIP core tools -DIRECTORIES="amdgcn hip hsa hsa-amd-aqlprofile include lib libexec llvm share" - -# rocm-smi -DIRECTORIES+=" oam rocm_smi" - -# 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 tests" - -# ROCm Communication Collectives Library (RCCL) -#DIRECTORIES+=" rccl" - -# Machine Intelligence Libraries -#DIRECTORIES+=" miopen miopengemm" - -# 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 +rmdir %{i} +mv opt/rocm-%{realversion} %{i} +rm -rf opt +rm -rf usr + +# the hip directory is deprecated in favour of the main directory +rm -r -f %{i}/hip/ + +# hip-devel postinstall +ln -s -f amd_detail %{i}/include/hip/hcc_detail +ln -s -f nvidia_detail %{i}/include/hip/nvcc_detail +# deprecated +#ln -s -f amd_detail %{i}/hip/include/hip/hcc_detail +#ln -s -f nvidia_detail %{i}/hip/include/hip/nvcc_detail + +# hip-runtime-amd postinstall +# deprecated +#mkdir -p %{i}/hip/lib/cmake/hip +#mkdir -p %{i}/hip/lib/cmake/hip-lang +#ln -r -s -f %{i}/lib/cmake/hip/hip-targets* %{i}/hip/lib/cmake/hip/ +#ln -r -s -f %{i}/lib/cmake/hip-lang/hip-lang-targets* %{i}/hip/lib/cmake/hip-lang/ + +# rocm-llvm postinstall +mkdir -p %{i}/bin +ln -r -s -f %{i}/llvm/bin/amdclang %{i}/bin/ +ln -r -s -f %{i}/llvm/bin/amdclang++ %{i}/bin/ +ln -r -s -f %{i}/llvm/bin/amdclang-cl %{i}/bin/ +ln -r -s -f %{i}/llvm/bin/amdclang-cpp %{i}/bin/ +ln -r -s -f %{i}/llvm/bin/amdflang %{i}/bin/ +ln -r -s -f %{i}/llvm/bin/amdlld %{i}/bin/ + +# replace '/usr/libexec/platform-python' with '/usr/bin/env python3' +find %{i}/bin/ %{i}/libexec/ %{i}/llvm/bin/ %{i}/llvm/lib/ -type f | xargs -r \ + grep '#! */usr/libexec/platform-python' -l | xargs -r \ + sed -e'1 s|#! */usr/libexec/platform-python|#!/usr/bin/env python3|' -s -i + +%post diff --git a/scram-tools.file/tools/alpaka/alpaka-rocm.xml b/scram-tools.file/tools/alpaka/alpaka-rocm.xml index d33be6a13b4..eb0285bab3d 100644 --- a/scram-tools.file/tools/alpaka/alpaka-rocm.xml +++ b/scram-tools.file/tools/alpaka/alpaka-rocm.xml @@ -1,6 +1,7 @@ + diff --git a/scram-tools.file/tools/rocm-rocrand/rocm-rocrand.xml b/scram-tools.file/tools/rocm-rocrand/rocm-rocrand.xml new file mode 100644 index 00000000000..6397bf5c717 --- /dev/null +++ b/scram-tools.file/tools/rocm-rocrand/rocm-rocrand.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/scram-tools.file/tools/rocm/rocm-rocrand.xml b/scram-tools.file/tools/rocm/rocm-rocrand.xml deleted file mode 100644 index f6c2934b189..00000000000 --- a/scram-tools.file/tools/rocm/rocm-rocrand.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -