@@ -30,7 +30,7 @@ typedef Eigen::ThreadPoolDevice CPUDevice;
30
30
template <typename Device, typename T>
31
31
class FusedRandomOp : public OpKernel {
32
32
public:
33
- typedef random::UniformDistribution<random::PCGRandom , T> Uniform;
33
+ typedef random::UniformDistribution<random::PhiloxRandom , T> Uniform;
34
34
explicit FusedRandomOp (OpKernelConstruction* ctx) : OpKernel(ctx) {
35
35
OP_REQUIRES_OK (ctx, generator_.Init (ctx));
36
36
OP_REQUIRES_OK (ctx, ctx->GetAttr (" direction" , &direction_));
@@ -69,17 +69,17 @@ class FusedRandomOp : public OpKernel {
69
69
OP_REQUIRES (ctx, dims == 0 ,
70
70
errors::InvalidArgument (" Only support compare dim is 0 " ));
71
71
// TODO(yifeng): To support binary operations other than GreaterEqual.
72
- functor::FillPCGRandom <CPUDevice, Uniform>()(
72
+ functor::FillPhiloxRandom <CPUDevice, Uniform>()(
73
73
ctx, ctx->eigen_device <CPUDevice>(),
74
74
// Multiplier 256 is the same as in FillRandomTask; do not change it
75
75
// just here.
76
76
generator_.ReserveRandomOutputs (output_flat.size (), 256 ),
77
- output_flat.data (), output_flat.size (), Uniform (),
77
+ output_flat.data (), output_flat.size (), Uniform (), nullptr , nullptr ,
78
78
compare.flat <T>().data ());
79
79
}
80
80
81
81
private:
82
- GuardedPCGRandom generator_;
82
+ GuardedPhiloxRandom generator_;
83
83
int direction_ = 0 ;
84
84
std::vector<string> fused_ops_;
85
85
};
0 commit comments