Two fixes, one for performance with the latest DataParallelTable and one for the GPU flag.
model:apply(function(m) if m.syncParameters then m:syncParameters() end end)
creates huge slowdowns on multi-GPU (an alexnet minibatch takes about 20 seconds on 4xTitan X, CUDNN R4), most likely due to breaking changes in the latest version of DPT.
The fix is simple:
if model.needsSync then model:syncParameters() end
the second issue is that the GPU flag did not work as no device was chosen if nGPU was 1. Moved the setDevice so that it is called in all cases.
Two fixes, one for performance with the latest DataParallelTable and one for the GPU flag.
model:apply(function(m) if m.syncParameters then m:syncParameters() end end)
creates huge slowdowns on multi-GPU (an alexnet minibatch takes about 20 seconds on 4xTitan X, CUDNN R4), most likely due to breaking changes in the latest version of DPT.The fix is simple:
if model.needsSync then model:syncParameters() end
the second issue is that the GPU flag did not work as no device was chosen if nGPU was 1. Moved the setDevice so that it is called in all cases.
Luka