提交 554e08ac 编写于 作者: Q qijun

fix build error: 'type name' declared as function returning a function

上级 f48e2faf
......@@ -33,7 +33,8 @@ class GaussianRandomKernel : public framework::OpKernel {
int seed = context.op_.GetAttr<int>("seed");
if (seed == 0) {
seed = std::random_device()();
std::random_device rd;
seed = rd();
}
curandGenerator_t g;
PADDLE_ENFORCE(platform::dynload::curandCreateGenerator(
......
......@@ -51,7 +51,8 @@ class GPUUniformRandomKernel : public framework::OpKernel {
unsigned int seed =
static_cast<unsigned int>(context.op_.GetAttr<int>("seed"));
if (seed == 0) {
seed = std::random_device()();
std::random_device rd;
seed = rd();
}
T min = static_cast<T>(context.op_.GetAttr<float>("min"));
T max = static_cast<T>(context.op_.GetAttr<float>("max"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册