Skip to content

Commit

Permalink
Fix for codes not using pinned memory (apache#7001)
Browse files Browse the repository at this point in the history
* Fix for codes not using pinned memory

* Fix from review

* Fix indentation
  • Loading branch information
ptrendx authored and piiswrong committed Jul 11, 2017
1 parent 310633a commit 2b9e960
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/storage/storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Storage::Handle StorageImpl::Alloc(size_t size, Context ctx) {
}
case Context::kGPU: {
#if MXNET_USE_CUDA
CUDA_CALL(cudaGetDeviceCount(&num_gpu_device));
CHECK_GT(num_gpu_device, 0) << "GPU usage requires at least 1 GPU";
ptr = new storage::GPUPooledStorageManager();
#else
LOG(FATAL) << "Compile with USE_CUDA=1 to enable GPU usage";
Expand Down

0 comments on commit 2b9e960

Please sign in to comment.