Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Dependency Update] Upgrade CI to use latest cuDNN #14950

Merged
merged 9 commits into from
May 17, 2019
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
2 changes: 1 addition & 1 deletion ci/docker/Dockerfile.build.centos7_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ RUN /work/centos7_ccache.sh
COPY install/centos7_python.sh /work/
RUN /work/centos7_python.sh

ENV CUDNN_VERSION=7.3.1.20
ENV CUDNN_VERSION=7.5.1.10
COPY install/centos7_cudnn.sh /work/
RUN /work/centos7_cudnn.sh

Expand Down
2 changes: 2 additions & 0 deletions ci/docker/Dockerfile.build.ubuntu_base_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.5.1.10

WORKDIR /work/deps

RUN apt-get update && apt-get -y install sudo
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/Dockerfile.build.ubuntu_build_cuda
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20
ENV CUDNN_VERSION=7.5.1.10

WORKDIR /work/deps

Expand Down
3 changes: 3 additions & 0 deletions ci/docker/Dockerfile.build.ubuntu_gpu_cu100
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

ENV CUDNN_VERSION=7.5.1.10
COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

COPY runtime_functions.sh /work/

Expand Down
4 changes: 4 additions & 0 deletions ci/docker/Dockerfile.build.ubuntu_gpu_cu90
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

ENV CUDNN_VERSION=7.5.1.10
COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

COPY runtime_functions.sh /work/

WORKDIR /work/mxnet
Expand Down
4 changes: 4 additions & 0 deletions ci/docker/Dockerfile.build.ubuntu_gpu_cu92
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ ARG GROUP_ID=0
COPY install/ubuntu_adduser.sh /work/
RUN /work/ubuntu_adduser.sh

ENV CUDNN_VERSION=7.5.1.10
COPY install/ubuntu_cudnn.sh /work/
RUN /work/ubuntu_cudnn.sh

COPY runtime_functions.sh /work/

WORKDIR /work/mxnet
Expand Down
2 changes: 1 addition & 1 deletion ci/docker/Dockerfile.build.ubuntu_nightly_gpu
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

FROM nvidia/cuda:10.0-devel-ubuntu16.04

ENV CUDNN_VERSION=7.3.1.20
ENV CUDNN_VERSION=7.5.1.10

WORKDIR /work/deps

Expand Down
15 changes: 14 additions & 1 deletion src/operator/rnn-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,21 @@ class RNNOp {
seed_));

// RNN descriptors
cudnnDataType_t dtype_with_fallback_;
#if CUDNN_MAJOR >= 6
cudnnRNNAlgo_t rnn_algo = CUDNN_RNN_ALGO_STANDARD;
// On arch's 50 and 52(Maxwell), the gpu doesn't support native fp16 compute.
// Before cuDNN 7.5.0, when running fp16, cuDNN fallback to fp32 under the hood on Maxwell.
// That's not the case begining from 7.5.0. Thereby adding fallback explicitly here.
#if __CUDA_ARCH__ < 530 && CUDNN_MAJOR >=7 && CUDNN_MINOR >= 5
if (dtype_ == CUDNN_DATA_HALF) {
dtype_with_fallback_ = CUDNN_DATA_FLOAT;
} else {
dtype_with_fallback_ = dtype_;
}
#else
dtype_with_fallback_ = dtype_;
#endif
CUDNN_CALL(cudnnSetRNNDescriptor_v6(s->dnn_handle_,
rnn_desc_,
param_.state_size,
Expand All @@ -1326,7 +1339,7 @@ class RNNOp {
direction_,
mode_,
rnn_algo,
dtype_));
dtype_with_fallback_));
#else
CUDNN_CALL(cudnnSetRNNDescriptor(rnn_desc_,
param_.state_size,
Expand Down