Merge pull request !39413 from DavidFFFan/fix_warning
This commit is contained in:
i-robot 2022-08-02 21:32:58 +00:00 committed by Gitee
commit 99ed99d63d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 3 additions and 5 deletions

View File

@ -3076,7 +3076,7 @@ void OnnxExporter::ExportPrimTensorCopySlices(const FuncGraphPtr &, const CNodeP
size_t flat_end_index = RavelIndex(end_inclusive, x_shape) + 1;
int64_t x_size = std::accumulate(x_shape.begin(), x_shape.end(), 1, std::multiplies<int64_t>());
size_t value_size = std::accumulate(value_shape.begin(), value_shape.end(), 1, std::multiplies<size_t>());
size_t value_size = std::accumulate(value_shape.begin(), value_shape.end(), 1UL, std::multiplies<size_t>());
MS_EXCEPTION_IF_CHECK_FAIL(value_size == flat_end_index - flat_begin_index, "Cannot copy 'value' to target slice");
auto flat_x_name = node_name + "_flat_x";

View File

@ -1141,7 +1141,7 @@ void DfGraphConvertor::SetParamIndexMap(const std::vector<AnfNodePtr> &graphs) {
for (size_t i = 0; i < body_params.size(); i++) {
auto p = body_params[i];
int64_t idx = find(cond_params.begin(), cond_params.end(), p) - cond_params.begin();
body_cond_map_[i] = idx;
body_cond_map_[i] = static_cast<size_t>(idx);
MS_LOG(DEBUG) << "body_cond_map_'s key: " << i << " value: " << idx;
}
@ -1158,7 +1158,7 @@ void DfGraphConvertor::SetParamIndexMap(const std::vector<AnfNodePtr> &graphs) {
for (size_t i = 0; i < after_params.size(); i++) {
auto p = after_params[i];
int64_t idx = find(cond_params.begin(), cond_params.end(), p) - cond_params.begin();
after_cond_map_[i] = idx;
after_cond_map_[i] = static_cast<size_t>(idx);
MS_LOG(DEBUG) << "after_cond_map_'s key: " << i << " value: " << idx;
}
return;

View File

@ -41,7 +41,6 @@
#include "transform/graph_ir/op_adapter.h"
#include "graph/operator_reg.h"
#include "external/ge/ge_api.h"
#include "graph/tensor.h"
#include "graph/utils/op_desc_utils.h"
#include "graph/utils/tensor_utils.h"
#include "ops/hcom_ops.h"

View File

@ -17,7 +17,6 @@
#ifndef MINDSPORE_CCSRC_TRANSFORM_GRAPH_IR_GRAPH_RUNNER_H_
#define MINDSPORE_CCSRC_TRANSFORM_GRAPH_IR_GRAPH_RUNNER_H_
#include <set>
#include <vector>
#include <memory>