From 69b1b26511d6a838b4542e7844fd13fd257d96b8 Mon Sep 17 00:00:00 2001 From: dongzhihong Date: Wed, 26 Jul 2017 00:47:22 +0800 Subject: [PATCH] "cpu only macro" --- paddle/operators/random_op.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/operators/random_op.h b/paddle/operators/random_op.h index 8231b6b6134..26dba130e43 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 } } }; -- GitLab