Skip to content
This repository has been archived by the owner on Oct 15, 2019. It is now read-only.

Commit

Permalink
fix problem when compiling without CUDA
Browse files Browse the repository at this point in the history
  • Loading branch information
hjk41 committed Jun 9, 2015
1 parent f3d68ee commit 1508863
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/ps/mnist_mlp_ps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ int MinervaWorkerMain(int rank, int size, int argc, char *argv[]) {
bias[k] = NArray::PushGradAndPullWeight(sens[k + 1].Sum(1) / mb_size, GetBiasName(k));
weights[k] = NArray::PushGradAndPullWeight(sens[k + 1] * acts[k].Trans() / mb_size, GetWeightName(k));
}
#ifdef HAS_CUDA
ms.SetDevice(gpuDevice);
#endif

if ((mb - rank) % 20 == 0) {
ms.SetDevice(cpuDevice);
Expand Down

0 comments on commit 1508863

Please sign in to comment.