From 35d4f5df368415c27dda955130bcc01d6234ffe6 Mon Sep 17 00:00:00 2001 From: soumith Date: Thu, 9 Apr 2015 19:13:50 -0700 Subject: using the new streams API (cudnn does not ovelap compute yet, weird) --- SpatialSoftMax.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'SpatialSoftMax.lua') diff --git a/SpatialSoftMax.lua b/SpatialSoftMax.lua index 97c1e38..adbb044 100644 --- a/SpatialSoftMax.lua +++ b/SpatialSoftMax.lua @@ -58,7 +58,7 @@ local zero = torch.FloatTensor({0}); function SpatialSoftMax:updateOutput(input) self:createIODescriptors(input) errcheck('cudnnSoftmaxForward', - cudnn.handle[cutorch.getDevice()-1], + cudnn.getHandle(), self.algorithm, self.mode, one:data(), self.iDesc[0], input:data(), @@ -71,7 +71,7 @@ function SpatialSoftMax:updateGradInput(input, gradOutput) assert(gradOutput:isContiguous()); self:createIODescriptors(input) errcheck('cudnnSoftmaxBackward', - cudnn.handle[cutorch.getDevice()-1], + cudnn.getHandle(), self.algorithm, self.mode, one:data(), self.oDesc[0], self.output:data(), -- cgit v1.2.3