!39413 Clean code
Merge pull request !39413 from DavidFFFan/fix_warning
This commit is contained in:
commit
99ed99d63d
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue