From 85288f9d7543201ee6d84bd6f0709db2a098a09b Mon Sep 17 00:00:00 2001 From: yuchaojie Date: Tue, 7 Feb 2023 14:34:13 +0800 Subject: [PATCH] code check clean --- mindspore/ccsrc/backend/common/session/kernel_graph.cc | 2 +- mindspore/ccsrc/backend/common/session/kernel_graph.h | 2 +- mindspore/ccsrc/cxx_api/model/model.cc | 6 +++--- mindspore/ccsrc/include/common/duplex_pipe.h | 3 +-- .../mindspore/ops/composite/multitype_ops/_compile_utils.py | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/mindspore/ccsrc/backend/common/session/kernel_graph.cc b/mindspore/ccsrc/backend/common/session/kernel_graph.cc index 709bea20146..01526265c81 100644 --- a/mindspore/ccsrc/backend/common/session/kernel_graph.cc +++ b/mindspore/ccsrc/backend/common/session/kernel_graph.cc @@ -445,7 +445,7 @@ ValueNodePtr KernelGraph::NewValueNode(const ValueNodePtr &value_node) const { return new_value_node; } -ValueNodePtr KernelGraph::NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value) { +ValueNodePtr KernelGraph::NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value) const { MS_EXCEPTION_IF_NULL(abstract); MS_EXCEPTION_IF_NULL(value); ValueNodePtr new_value_node = std::make_shared(value); diff --git a/mindspore/ccsrc/backend/common/session/kernel_graph.h b/mindspore/ccsrc/backend/common/session/kernel_graph.h index cbde8298f6d..f1fc3ea326e 100644 --- a/mindspore/ccsrc/backend/common/session/kernel_graph.h +++ b/mindspore/ccsrc/backend/common/session/kernel_graph.h @@ -153,7 +153,7 @@ class BACKEND_EXPORT KernelGraph : public FuncGraph { void ResetAssignInputFeatureMapFlag(const CNodePtr &cnode) const; ParameterPtr NewParameter(const ParameterPtr ¶meter = nullptr); ParameterPtr NewParameter(const abstract::AbstractBasePtr &abstract); - ValueNodePtr NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value); + ValueNodePtr NewValueNode(const AbstractBasePtr &abstract, const ValuePtr &value) const; ValueNodePtr NewValueNode(const ValueNodePtr &value_node = nullptr) const; ValueNodePtr NewValueNode(const tensor::TensorPtr &input_tensor); // trans tuple output to maketuple + no_tuple out diff --git a/mindspore/ccsrc/cxx_api/model/model.cc b/mindspore/ccsrc/cxx_api/model/model.cc index b4c3a050c68..1f51d22557f 100644 --- a/mindspore/ccsrc/cxx_api/model/model.cc +++ b/mindspore/ccsrc/cxx_api/model/model.cc @@ -63,9 +63,9 @@ Status Model::Build(const std::vector &, ModelType, const std::shared_ptr< return kMCFailed; } -Status Model::Build(const void *model_data, size_t data_size, ModelType model_type, - const std::shared_ptr &model_context, const Key &dec_key, - const std::vector &dec_mode, const std::vector &cropto_lib_path) { +Status Model::Build(const void * /* model_data */, size_t /* data_size */, ModelType /* model_type */, + const std::shared_ptr & /* model_context */, const Key & /* dec_key */, + const std::vector & /* dec_mode */, const std::vector & /* cropto_lib_path */) { MS_LOG(ERROR) << "Unsupported Feature."; return kMCFailed; } diff --git a/mindspore/ccsrc/include/common/duplex_pipe.h b/mindspore/ccsrc/include/common/duplex_pipe.h index f50358b12e0..273e590bbaf 100644 --- a/mindspore/ccsrc/include/common/duplex_pipe.h +++ b/mindspore/ccsrc/include/common/duplex_pipe.h @@ -1,5 +1,5 @@ /** - * Copyright 2020 Huawei Technologies Co., Ltd + * Copyright 2020-2023 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ #include #include "utils/log_adapter.h" -#include "utils/os.h" #include "include/common/visible.h" #define DP_INFO MS_LOG(INFO) << "[DuplexPipe] " diff --git a/mindspore/python/mindspore/ops/composite/multitype_ops/_compile_utils.py b/mindspore/python/mindspore/ops/composite/multitype_ops/_compile_utils.py index eb75e5e97f8..36bd945bb92 100644 --- a/mindspore/python/mindspore/ops/composite/multitype_ops/_compile_utils.py +++ b/mindspore/python/mindspore/ops/composite/multitype_ops/_compile_utils.py @@ -1,4 +1,4 @@ -# Copyright 2020-2022 Huawei Technologies Co., Ltd +# Copyright 2020-2023 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.