diff --git a/tests/cpp/include/test_op.h b/tests/cpp/include/test_op.h index cb45c89bc684..17f2e568a54d 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, 0); + 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"; }