diff --git a/paddle/framework/mixed_vector.h b/paddle/framework/mixed_vector.h index aade7d839181ee1741f30298f32a06ffc746292f..1fc7622e9b299a67c43bcc4560a66c4ca3ca697e 100644 --- a/paddle/framework/mixed_vector.h +++ b/paddle/framework/mixed_vector.h @@ -116,6 +116,8 @@ inline T *Vector::mutable_data(platform::Place place) { this->size() * sizeof(T), ctx->stream()); ctx->Wait(); return static_cast(cuda_ptr_.get()); +#else + return nullptr; #endif } else { PADDLE_THROW("Unsupport Place.");