Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download CUDNN9 compatible wheels HERE #1803

Merged
merged 6 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/rhel7/x86_64/cuda-rhel7.repo
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo
minhthuc2502 marked this conversation as resolved.
Show resolved Hide resolved
# 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 \
libcudnn8-devel-8.9.7.29-1.cuda12.2 \
libcudnn9-devel-cuda-12-9.1.0.70-1 \
minhthuc2502 marked this conversation as resolved.
Show resolved Hide resolved
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
20 changes: 17 additions & 3 deletions python/tools/prepare_build_environment_windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,24 @@ 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/v8.8"
curl -L -nv -o cudnn.exe https://developer.download.nvidia.com/compute/redist/cudnn/v8.8.0/local_installers/12.0/cudnn_8.8.0.121_windows.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.exe -s
sleep 10
# Remove 11.8 folders
rm -rf "$CUDNN_ROOT/bin/11.8"
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/"

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

Expand Down Expand Up @@ -40,4 +54,4 @@ rm -r build
cp README.md python/
cp $CTRANSLATE2_ROOT/bin/ctranslate2.dll python/ctranslate2/
cp "C:/Program Files (x86)/Intel/oneAPI/compiler/latest/windows/redist/intel64_win/compiler/libiomp5md.dll" python/ctranslate2/
cp "$CUDA_ROOT/bin/cudnn64_8.dll" python/ctranslate2/
cp "$CUDA_ROOT/bin/cudnn64_9.dll" python/ctranslate2/
Loading