Skip to content

Commit

Permalink
Disable cuDNN persistent RNN on sm_86 devices (pytorch#49534)
Browse files Browse the repository at this point in the history
Summary:
Excludes sm_86 GPU devices from using cuDNN persistent RNN.

This is because there are some hard-to-detect edge cases that will throw exceptions with cudnn 8.0.5 on Nvidia A40 GPU.

Pull Request resolved: pytorch#49534

Reviewed By: mruberry

Differential Revision: D25632378

Pulled By: mrshenli

fbshipit-source-id: cbe78236d85d4d0c2e4ca63a3fc2c4e2de662d9e
  • Loading branch information
xwang233 authored and hwangdeyu committed Jan 14, 2021
1 parent 20e9dd8 commit d20b21b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions aten/src/ATen/native/cudnn/RNN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,11 @@ namespace {
(tensors.seq_length >=10 && bsize <=32));
}
} else if (prop->major >= 8) {
if (prop->minor == 6) {
// Excludes sm_86 GPU devices from using persistent rnn.
// This is because there are some edge cases that will throw exceptions with cudnn 8.0.5 on Nvidia A40 GPU.
return false;
}
// Based on tests by Vasily Volkov and xwang233. Vasily only tried bsize <= 128,
// so conservatively enable persistence for bsize <= 128 only.
// TODO: Run more tests for bsize > 128.
Expand Down

0 comments on commit d20b21b

Please sign in to comment.