From 6727c81de7f6e3baabf402d5b20b8890e81f57a9 Mon Sep 17 00:00:00 2001 From: Lai Wei Date: Mon, 4 Mar 2019 22:20:15 -0800 Subject: [PATCH] Use cudnn for dropout by default (#14278) * use cudnn for dropout by default * update test * use dev_id * trigger ci * trigger ci --- src/operator/nn/dropout-inl.h | 2 +- tests/cpp/include/test_op.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/operator/nn/dropout-inl.h b/src/operator/nn/dropout-inl.h index f184fbdc2282..82bdda69dcd0 100644 --- a/src/operator/nn/dropout-inl.h +++ b/src/operator/nn/dropout-inl.h @@ -77,7 +77,7 @@ struct DropoutParam : public dmlc::Parameter { .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(true)) + DMLC_DECLARE_FIELD(cudnn_off).set_default(dmlc::optional(false)) .describe("Whether to turn off cudnn in dropout operator. " "This option is ignored if axes is specified."); } diff --git a/tests/cpp/include/test_op.h b/tests/cpp/include/test_op.h index d581e88357de..67d98c4457e1 100644 --- a/tests/cpp/include/test_op.h +++ b/tests/cpp/include/test_op.h @@ -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(true, true); + opContext_.run_ctx.stream = mshadow::NewStream(true, true, opContext_.run_ctx.ctx.dev_id); CHECK_EQ(opContext_.run_ctx.stream != nullptr, true) << "Unable to allocate a GPU stream"; }