diff --git a/paddle/operators/get_places_op.cc b/paddle/operators/get_places_op.cc index 6373df2158d75a6c1f1707c14e5965e5575c14d2..5158af8f4295dee3fbf110ee38673f8dff946465 100644 --- a/paddle/operators/get_places_op.cc +++ b/paddle/operators/get_places_op.cc @@ -41,7 +41,7 @@ class GetPlacesOp : public framework::OperatorBase { places.resize(trainer_count); if (device_type == "CUDA") { #ifdef PADDLE_WITH_CUDA - PADDLE_ENFORCE_LT(trainer_count, GetCUDADeviceCount()); + PADDLE_ENFORCE_LT(trainer_count, platform::GetCUDADeviceCount()); for (int i = 0; i < trainer_count; i++) { places.emplace_back(platform::GPUPlace(i)); }