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 /SpatialMaxPooling.lua
parentae62e2be0dc9cf7500972b7355ccfd46e3d2b1a8 (diff)
Multi-GPU support
Diffstat (limited to 'SpatialMaxPooling.lua')
-rw-r--r--SpatialMaxPooling.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/SpatialMaxPooling.lua b/SpatialMaxPooling.lua
index e3f9fe4..bd9039d 100644
--- a/SpatialMaxPooling.lua
+++ b/SpatialMaxPooling.lua
@@ -43,7 +43,7 @@ end
function SpatialMaxPooling:updateOutput(input)
assert(input:dim() == 4 and input:isContiguous());
self:createIODescriptors(input)
- errcheck('cudnnPoolingForward', cudnn.handle[0], self.poolDesc[0],
+ errcheck('cudnnPoolingForward', cudnn.handle[cutorch.getDevice()-1], self.poolDesc[0],
self.iDesc[0], input:data(),
self.oDesc[0], self.output:data());
return self.output
@@ -52,7 +52,7 @@ end
function SpatialMaxPooling:updateGradInput(input, gradOutput)
assert(input:dim() == 4 and input:isContiguous());
assert(gradOutput:dim() == 4 and gradOutput:isContiguous());
- errcheck('cudnnPoolingBackward', cudnn.handle[0], self.poolDesc[0],
+ errcheck('cudnnPoolingBackward', cudnn.handle[cutorch.getDevice()-1], self.poolDesc[0],
self.oDesc[0], self.output:data(),
self.oDesc[0], gradOutput:data(),
self.iDesc[0], input:data(),