Skip to content

Commit

Permalink
Fix warning when CPU only (apache#4751)
Browse files Browse the repository at this point in the history
  • Loading branch information
howard0su authored and Rahul Ravu committed Jan 21, 2017
1 parent 59adf6f commit da8cbe6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/engine/profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ Profiler::Profiler()
this->init_time_ = NowInUsec();

// TODO(ziheng) get device number during execution
int kMaxNumCpus = 64, kMaxNumGpus = 32;
int kMaxNumCpus = 64;
this->cpu_num_ = kMaxNumCpus;
this->gpu_num_ = 0;
#if MXNET_USE_CUDA
int kMaxNumGpus = 32;
this->gpu_num_ = kMaxNumGpus;
#else
this->gpu_num_ = 0;
#endif

this->profile_stat = new DevStat[cpu_num_ + gpu_num_ + 1];
Expand Down

0 comments on commit da8cbe6

Please sign in to comment.