提交 aff90d8e 编写于 作者: Q qijun

fix gpu build error

上级 1918ad87
...@@ -30,7 +30,7 @@ struct GaussianGenerator { ...@@ -30,7 +30,7 @@ struct GaussianGenerator {
__host__ __device__ T operator()(const unsigned int n) const { __host__ __device__ T operator()(const unsigned int n) const {
thrust::minstd_rand rng; thrust::minstd_rand rng;
rng.seed(seed_); rng.seed(seed_);
thrust::normal_distribution<T> dist(min_, max_); thrust::normal_distribution<T> dist(mean_, std_);
rng.discard(n); rng.discard(n);
return dist(rng); return dist(rng);
} }
...@@ -62,4 +62,4 @@ class GPUGaussianRandomKernel : public framework::OpKernel { ...@@ -62,4 +62,4 @@ class GPUGaussianRandomKernel : public framework::OpKernel {
} // namespace paddle } // namespace paddle
REGISTER_OP_GPU_KERNEL(gaussian_random, REGISTER_OP_GPU_KERNEL(gaussian_random,
paddle::operators::GPUGaussianRandomKernel<float>); paddle::operators::GPUGaussianRandomKernel<float>);
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册