diff --git a/cuda.spec b/cuda.spec index cc7744ec99f..a0ebacb4b02 100644 --- a/cuda.spec +++ b/cuda.spec @@ -1,8 +1,8 @@ -### RPM external cuda 11.4.4 +### RPM external cuda 11.5.2 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 %define runpath_opts -m compute-sanitizer -m drivers -m nvvm -%define driversversion 470.82.01 +%define driversversion 495.29.05 %ifarch x86_64 Source0: https://developer.download.nvidia.com/compute/cuda/%{realversion}/local_installers/%{n}_%{realversion}_%{driversversion}_linux.run @@ -99,6 +99,9 @@ ln -sf libcuda.so.1 %{i} mv %_builddir/build/drivers/libnvidia-ptxjitcompiler.so.%{driversversion} %{i}/drivers/ ln -sf libnvidia-ptxjitcompiler.so.%{driversversion} %{i}/drivers/libnvidia-ptxjitcompiler.so.1 ln -sf libnvidia-ptxjitcompiler.so.1 %{i}/drivers/libnvidia-ptxjitcompiler.so +cp %{i}/nvvm/lib64/libnvvm.so.4.0.0 %{i}/drivers/ +ln -sf libnvvm.so.4.0.0 %{i}/drivers/libnvvm.so.4 +ln -sf libnvvm.so.4 %{i}/drivers/libnvvm.so %post # let nvcc find its components when invoked from the command line diff --git a/cudnn.spec b/cudnn.spec index 5cb14e25a77..40e17add1f5 100644 --- a/cudnn.spec +++ b/cudnn.spec @@ -1,22 +1,24 @@ -### RPM external cudnn 8.2.2.26 +### RPM external cudnn 8.3.2.44 ## INITENV +PATH LD_LIBRARY_PATH %i/lib64 -%define cudaver 11.4 +%define cudaver 11.5 %define cudnnver_maj %(echo %{realversion} | cut -f1,2,3 -d.) -%ifarch x86_64 -Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-x64-v%{realversion}.tgz -%endif -%ifarch ppc64le -Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-ppc64le-v%{realversion}.tgz -%endif +# NVIDIA uses sbsa for aarch64, and the standard architecture name for ppc64le and x86_64 %ifarch aarch64 -Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/cudnn-%{cudaver}-linux-aarch64sbsa-v%{realversion}.tgz +%define nvarch sbsa +%else +%define nvarch %{_arch} %endif + +# cuDNN archive base name and unpacked name +%define archive cudnn-linux-%{nvarch}-%{realversion}_cuda%{cudaver}-archive + +Source: https://developer.download.nvidia.com/compute/redist/cudnn/v%{cudnnver_maj}/local_installers/%{cudaver}/%{archive}.tar.xz Requires: cuda %prep -%setup -n cuda +%setup -n %{archive} if [ "${CUDA_VERSION%.*}" != %{cudaver} ]; then echo 'Incompatible CUDA version in cudnn.spec!' @@ -26,12 +28,6 @@ fi %build %install -%ifarch ppc64le -rm -f %_builddir/cuda/targets/ppc64le-linux/lib/*.a -mv %_builddir/cuda/targets/ppc64le-linux/lib %{i}/lib64 -mv %_builddir/cuda/targets/ppc64le-linux/* %{i}/ -%else -rm -f %_builddir/cuda/lib64/*.a -mv %_builddir/cuda/* %{i}/ -%endif - +# onnxruntime is hardcoded to look for the cudnn libraries under .../lib64 +mv %_builddir/%{archive}/lib %{i}/lib64 +mv %_builddir/%{archive}/* %{i}/