1010 arch_path=' sbsa'
1111fi
1212
13+ NVSHMEM_VERSION=3.3.9
14+
1315function install_cuda {
1416 version=$1
1517 runfile=$2
@@ -40,13 +42,52 @@ function install_cudnn {
4042 rm -rf tmp_cudnn
4143}
4244
45+ function install_nvshmem {
46+ cuda_major_version=$1 # e.g. "12"
47+ nvshmem_version=$2 # e.g. "3.3.9"
48+
49+ case " ${arch_path} " in
50+ sbsa)
51+ dl_arch=" aarch64"
52+ ;;
53+ x86_64)
54+ dl_arch=" x64"
55+ ;;
56+ * )
57+ dl_arch=" ${arch} "
58+ ;;
59+ esac
60+
61+ tmpdir=" tmp_nvshmem"
62+ mkdir -p " ${tmpdir} " && cd " ${tmpdir} "
63+
64+ # nvSHMEM license: https://docs.nvidia.com/nvshmem/api/sla.html
65+ filename=" libnvshmem_cuda${cuda_major_version} -linux-${arch_path} -${nvshmem_version} "
66+ url=" https://developer.download.nvidia.com/compute/redist/nvshmem/${nvshmem_version} /builds/cuda${cuda_major_version} /txz/agnostic/${dl_arch} /${filename} .tar.gz"
67+
68+ # download, unpack, install
69+ wget -q " ${url} "
70+ tar xf " ${filename} .tar.gz"
71+ cp -a " libnvshmem/include/" * /usr/local/include/
72+ cp -a " libnvshmem/lib/" * /usr/local/lib/
73+
74+ # cleanup
75+ cd ..
76+ rm -rf " ${tmpdir} "
77+
78+ echo " nvSHMEM ${nvshmem_version} for CUDA ${cuda_major_version} (${arch_path} ) installed."
79+ }
80+
81+
4382function install_126 {
4483 CUDNN_VERSION=9.10.2.21
45- echo " Installing CUDA 12.6.3 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
84+ echo " Installing CUDA 12.6.3 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
4685 install_cuda 12.6.3 cuda_12.6.3_560.35.05_linux
4786
4887 install_cudnn 12 $CUDNN_VERSION
4988
89+ install_nvshmem 12 $NVSHMEM_VERSION
90+
5091 CUDA_VERSION=12.6 bash install_nccl.sh
5192
5293 CUDA_VERSION=12.6 bash install_cusparselt.sh
@@ -56,13 +97,15 @@ function install_126 {
5697
5798function install_129 {
5899 CUDNN_VERSION=9.10.2.21
59- echo " Installing CUDA 12.9.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
100+ echo " Installing CUDA 12.9.1 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
60101 # install CUDA 12.9.1 in the same container
61102 install_cuda 12.9.1 cuda_12.9.1_575.57.08_linux
62103
63104 # cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
64105 install_cudnn 12 $CUDNN_VERSION
65106
107+ install_nvshmem 12 $NVSHMEM_VERSION
108+
66109 CUDA_VERSION=12.9 bash install_nccl.sh
67110
68111 CUDA_VERSION=12.9 bash install_cusparselt.sh
@@ -106,13 +149,15 @@ function prune_126 {
106149
107150function install_128 {
108151 CUDNN_VERSION=9.8.0.87
109- echo " Installing CUDA 12.8.1 and cuDNN ${CUDNN_VERSION} and NCCL and cuSparseLt-0.7.1"
152+ echo " Installing CUDA 12.8.1 and cuDNN ${CUDNN_VERSION} and NVSHMEM and NCCL and cuSparseLt-0.7.1"
110153 # install CUDA 12.8.1 in the same container
111154 install_cuda 12.8.1 cuda_12.8.1_570.124.06_linux
112155
113156 # cuDNN license: https://developer.nvidia.com/cudnn/license_agreement
114157 install_cudnn 12 $CUDNN_VERSION
115158
159+ install_nvshmem 12 $NVSHMEM_VERSION
160+
116161 CUDA_VERSION=12.8 bash install_nccl.sh
117162
118163 CUDA_VERSION=12.8 bash install_cusparselt.sh
0 commit comments