diff --git a/mindspore/ccsrc/minddata/dataset/api/execute.cc b/mindspore/ccsrc/minddata/dataset/api/execute.cc index 8560d20853..fd30078f62 100644 --- a/mindspore/ccsrc/minddata/dataset/api/execute.cc +++ b/mindspore/ccsrc/minddata/dataset/api/execute.cc @@ -191,7 +191,7 @@ Execute::Execute(const std::vector> ops, } // Execute function for the example vector case: auto decode(new vision::Decode()); -Execute::Execute(std::vector ops, MapTargetDevice deviceType, uint32_t device_id) { +Execute::Execute(const std::vector &ops, MapTargetDevice deviceType, uint32_t device_id) { // Initialize the transforms_ and other context for (auto &op : ops) { std::shared_ptr smart_ptr_op(op); diff --git a/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc b/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc index d9ceb6acb4..112c2ac20f 100644 --- a/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc +++ b/mindspore/ccsrc/minddata/dataset/core/de_tensor.cc @@ -79,7 +79,7 @@ size_t DETensor::DataSize() const { } #endif EXCEPTION_IF_NULL(tensor_impl_); - return tensor_impl_->SizeInBytes(); + return static_cast(tensor_impl_->SizeInBytes()); } const std::vector &DETensor::Shape() const { return shape_; } diff --git a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/transfer_node.cc b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/transfer_node.cc index 99e99e59d8..34ff78e8fb 100644 --- a/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/transfer_node.cc +++ b/mindspore/ccsrc/minddata/dataset/engine/ir/datasetops/transfer_node.cc @@ -77,14 +77,6 @@ Status TransferNode::Build(std::vector> *const node_o // https://gitee.com/mindspore/mindspore/issues/I39J9A // Link _c_expression.so and _c_dataengine.so simultaneously will cause heap overflow because MindData uses MSContext. // We should find a new way to get device_type here. - // if (device_type_.empty()) { - // auto context = MsContext::GetInstance(); - // if (context == nullptr) { - // device_type_ = kCPUDevice; - // } else { - // device_type_ = context->get_param(MS_CTX_DEVICE_TARGET); - // } - // } if (device_type_.empty()) { device_type_ = kCPUDevice; } diff --git a/mindspore/ccsrc/minddata/dataset/include/execute.h b/mindspore/ccsrc/minddata/dataset/include/execute.h index 003df67f2c..91dd180e8b 100644 --- a/mindspore/ccsrc/minddata/dataset/include/execute.h +++ b/mindspore/ccsrc/minddata/dataset/include/execute.h @@ -48,7 +48,7 @@ class Execute { MapTargetDevice deviceType = MapTargetDevice::kCpu, uint32_t device_id = 0); explicit Execute(const std::vector> ops, MapTargetDevice deviceType = MapTargetDevice::kCpu, uint32_t device_id = 0); - explicit Execute(std::vector ops, MapTargetDevice deviceType = MapTargetDevice::kCpu, + explicit Execute(const std::vector &ops, MapTargetDevice deviceType = MapTargetDevice::kCpu, uint32_t device_id = 0); /// \brief Destructor diff --git a/mindspore/dataset/engine/datasets.py b/mindspore/dataset/engine/datasets.py index 6ae65c7779..5537ef439e 100644 --- a/mindspore/dataset/engine/datasets.py +++ b/mindspore/dataset/engine/datasets.py @@ -2004,7 +2004,6 @@ class BatchDataset(Dataset): def __del__(self): if hasattr(self, 'process_pool') and self.process_pool is not None: - logger.info("Batch process pool is being terminated.") self.process_pool.close() @@ -2398,7 +2397,6 @@ class MapDataset(Dataset): def __del__(self): if hasattr(self, 'process_pool') and self.process_pool is not None: - logger.info("Map process pool is being terminated.") self.process_pool.close() self.process_pool.join() @@ -3247,7 +3245,6 @@ class SamplerFn: def _subprocess_handle(eof, signum, frame): - logger.info("The subprocess receives a termination signal.") eof.set()