diff --git a/paddle/operators/random_op.h b/paddle/operators/random_op.h index 8231b6b613454ae3807c7eacb29c4ce80a41c3ef..26dba130e43ba0e9a7ab818c7df7788708775b07 100644 --- a/paddle/operators/random_op.h +++ b/paddle/operators/random_op.h @@ -53,6 +53,7 @@ public: std, seed); } else { +#ifndef PADDLE_ONLY_CPU Gaussian( dynamic_cast(context.device_context_), output->mutable_data(context.GetPlace()), @@ -60,6 +61,7 @@ public: mean, std, seed); +#endif } } };