diff options
author | Soumith Chintala <soumith@gmail.com> | 2014-09-20 22:55:33 +0400 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2014-09-21 03:51:16 +0400 |
commit | 70433d6359cdae6833c315bb8151038ed9f75a1c (patch) | |
tree | 9d5fc34dfa6e63a920d80ea0e7090b368986eb45 /Tanh.lua | |
parent | ae62e2be0dc9cf7500972b7355ccfd46e3d2b1a8 (diff) |
Multi-GPU support
Diffstat (limited to 'Tanh.lua')
-rw-r--r-- | Tanh.lua | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -22,7 +22,7 @@ end function Tanh:updateOutput(input) assert(input:dim() == 4 and input:isContiguous()); self:createIODescriptors(input) - errcheck('cudnnActivationForward', cudnn.handle[0], 'CUDNN_ACTIVATION_TANH', + errcheck('cudnnActivationForward', cudnn.handle[cutorch.getDevice()-1], 'CUDNN_ACTIVATION_TANH', self.iDesc[0], input:data(), self.oDesc[0], self.output:data()); return self.output @@ -31,7 +31,7 @@ end function Tanh:updateGradInput(input, gradOutput) assert(input:dim() == 4 and input:isContiguous()); assert(gradOutput:dim() == 4 and gradOutput:isContiguous()); - errcheck('cudnnActivationBackward', cudnn.handle[0], 'CUDNN_ACTIVATION_TANH', + errcheck('cudnnActivationBackward', cudnn.handle[cutorch.getDevice()-1], 'CUDNN_ACTIVATION_TANH', self.oDesc[0], self.output:data(), self.oDesc[0], gradOutput:data(), self.iDesc[0], input:data(), |