Skip to content

Commit

Permalink
Use cudnn for dropout by default (apache#14278)
Browse files Browse the repository at this point in the history
* use cudnn for dropout by default

* update test

* use dev_id

* trigger ci

* trigger ci
  • Loading branch information
roywei authored and vdantu committed Mar 31, 2019
1 parent a769437 commit 6727c81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/operator/nn/dropout-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ struct DropoutParam : public dmlc::Parameter<DropoutParam> {
.describe("Whether to only turn on dropout during training or to also turn on for inference.");
DMLC_DECLARE_FIELD(axes).set_default(mxnet::TShape())
.describe("Axes for variational dropout kernel.");
DMLC_DECLARE_FIELD(cudnn_off).set_default(dmlc::optional<bool>(true))
DMLC_DECLARE_FIELD(cudnn_off).set_default(dmlc::optional<bool>(false))
.describe("Whether to turn off cudnn in dropout operator. "
"This option is ignored if axes is specified.");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp/include/test_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct GPUStreamScope {
: opContext_(*opContext) {
CHECK_EQ(opContext_.run_ctx.stream == nullptr, true)
<< "Invalid runtime context stream state";
opContext_.run_ctx.stream = mshadow::NewStream<gpu>(true, true);
opContext_.run_ctx.stream = mshadow::NewStream<gpu>(true, true, opContext_.run_ctx.ctx.dev_id);
CHECK_EQ(opContext_.run_ctx.stream != nullptr, true)
<< "Unable to allocate a GPU stream";
}
Expand Down

0 comments on commit 6727c81

Please sign in to comment.