You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2019/03/16 21:24:43 UTC
[incubator-mxnet] branch master updated: fix OOM error during
resource allocation (#14444)
This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new f602b0d fix OOM error during resource allocation (#14444)
f602b0d is described below
commit f602b0de310fbdad40b26a87e51c6820790858b3
Author: Sheng Zha <sz...@users.noreply.github.com>
AuthorDate: Sat Mar 16 14:24:14 2019 -0700
fix OOM error during resource allocation (#14444)
---
src/resource.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/resource.cc b/src/resource.cc
index 80a5c0e..0317ff3 100644
--- a/src/resource.cc
+++ b/src/resource.cc
@@ -432,6 +432,9 @@ void Resource::get_cudnn_dropout_desc(
// not initialized yet.
size_t dropout_state_size;
CUDNN_CALL(cudnnDropoutGetStatesSize(stream->dnn_handle_, &dropout_state_size));
+ // reserve GPU space
+ Storage::Get()->DirectFree(
+ Storage::Get()->Alloc(dropout_state_size, state_space->ctx));
CUDNN_CALL(cudnnSetDropoutDescriptor(*dropout_desc, stream->dnn_handle_,
dropout,
state_space->GetSpace(dropout_state_size),