Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Use cudnn for dropout by default #14278

Merged
merged 5 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(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