Skip to content

Commit

Permalink
downgrade cudnn
Browse files Browse the repository at this point in the history
  • Loading branch information
MahmoudAshraf97 committed Oct 24, 2024
1 parent 383d063 commit aab2953
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions python/tools/prepare_build_environment_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if [ "$CIBW_ARCHS" == "aarch64" ]; then

else
# Install CUDA 12.2:
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel8.repo
# error mirrorlist.centos.org doesn't exists anymore.
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo
Expand All @@ -29,7 +29,7 @@ else
cuda-nvcc-12-2-12.2.140-1 \
cuda-cudart-devel-12-2-12.2.140-1 \
libcurand-devel-12-2-10.3.3.141-1 \
libcudnn9-devel-cuda-12-9.1.0.70-1 \
libcudnn9-devel-cuda-12-9.0.0.312-1 \
libcublas-devel-12-2-12.2.5.6-1 \
libnccl-devel-2.19.3-1+cuda12.2
ln -s cuda-12.2 /usr/local/cuda
Expand Down
16 changes: 8 additions & 8 deletions python/tools/prepare_build_environment_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ curl -L -nv -o cuda.exe https://developer.download.nvidia.com/compute/cuda/12.2.
./cuda.exe -s nvcc_12.2 cudart_12.2 cublas_dev_12.2 curand_dev_12.2
rm cuda.exe

CUDNN_ROOT="C:/Program Files/NVIDIA/CUDNN/v9.1"
curl -L -nv -o cudnn.exe https://developer.download.nvidia.com/compute/cudnn/9.1.0/local_installers/cudnn_9.1.0_windows.exe
CUDNN_ROOT="C:/Program Files/NVIDIA/CUDNN/v9.0"
curl -L -nv -o cudnn.exe https://developer.download.nvidia.com/compute/cudnn/9.0.0/local_installers/cudnn_9.0.0_windows.exe
./cudnn.exe -s
sleep 10
# Remove 11.8 folders
Expand All @@ -18,14 +18,14 @@ rm -rf "$CUDNN_ROOT/lib/11.8"
rm -rf "$CUDNN_ROOT/include/11.8"

# Move contents of 12.4 to parent directories
mv "$CUDNN_ROOT/bin/12.4/"* "$CUDNN_ROOT/bin/"
mv "$CUDNN_ROOT/lib/12.4/"* "$CUDNN_ROOT/lib/"
mv "$CUDNN_ROOT/include/12.4/"* "$CUDNN_ROOT/include/"
mv "$CUDNN_ROOT/bin/12.3/"* "$CUDNN_ROOT/bin/"
mv "$CUDNN_ROOT/lib/12.3/"* "$CUDNN_ROOT/lib/"
mv "$CUDNN_ROOT/include/12.3/"* "$CUDNN_ROOT/include/"

# Remove empty 12.4 folders
rmdir "$CUDNN_ROOT/bin/12.4"
rmdir "$CUDNN_ROOT/lib/12.4"
rmdir "$CUDNN_ROOT/include/12.4"
rmdir "$CUDNN_ROOT/bin/12.3"
rmdir "$CUDNN_ROOT/lib/12.3"
rmdir "$CUDNN_ROOT/include/12.3"
cp -r "$CUDNN_ROOT"/* "$CUDA_ROOT"
rm cudnn.exe

Expand Down

0 comments on commit aab2953

Please sign in to comment.