Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/soumith/cudnn.torch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@gmail.com>2014-09-20 22:55:33 +0400
committerSoumith Chintala <soumith@gmail.com>2014-09-21 03:51:16 +0400
commit70433d6359cdae6833c315bb8151038ed9f75a1c (patch)
tree9d5fc34dfa6e63a920d80ea0e7090b368986eb45 /Tanh.lua
parentae62e2be0dc9cf7500972b7355ccfd46e3d2b1a8 (diff)
Multi-GPU support
Diffstat (limited to 'Tanh.lua')
-rw-r--r--Tanh.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tanh.lua b/Tanh.lua
index 387dbf1..52c2572 100644
--- a/Tanh.lua
+++ b/Tanh.lua
@@ -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(),