Browse Source

Clear UpdatePersistTensor Warning for first run

tags/v1.5.1
zhangxiaokun 3 years ago
parent
commit
eccff67f42
3 changed files with 8 additions and 4 deletions
  1. +3
    -3
      ge/graph/passes/mark_force_unknown_for_cond_pass.cc
  2. +1
    -1
      ge/graph/passes/mark_force_unknown_for_cond_pass.h
  3. +4
    -0
      ge/hybrid/executor/node_state.cc

+ 3
- 3
ge/graph/passes/mark_force_unknown_for_cond_pass.cc View File

@@ -56,8 +56,8 @@ Status MarkForceUnknownForCondPass::Run(ComputeGraphPtr graph) {
/// @param [out] Search queue
/// @return true: Switch In while loop / false: Not in while Loop.
///
bool MarkForceUnknownForCondPass::DealWithLoopSwitch(const NodePtr &node, uint32_t dst_span,
std::queue<std::pair<NodePtr, uint32_t>> search_queue) {
bool MarkForceUnknownForCondPass::DealAsLoopSwitch(const NodePtr &node, uint32_t dst_span,
std::queue<std::pair<NodePtr, uint32_t>> &search_queue) {
/// LoopCond --->\.
/// \.
/// Enter-----------+ \.
@@ -121,7 +121,7 @@ void MarkForceUnknownForCondPass::MarkUnknownForSwitch(const NodePtr &node, std:
GELOGD("Travel node: %s, %s node: %s, span is: %u", dst_node->GetName().c_str(), node_type.c_str(),
in_node->GetName().c_str(), dst_span);
if (kSwitchOpTypes.count(node_type) > 0) { // Switch input node.
if (DealWithLoopSwitch(in_node, dst_span, search_queue)) {
if (DealAsLoopSwitch(in_node, dst_span, search_queue)) {
continue;
}



+ 1
- 1
ge/graph/passes/mark_force_unknown_for_cond_pass.h View File

@@ -34,7 +34,7 @@ class MarkForceUnknownForCondPass : public GraphPass {
/// @param [out] Search queue
/// @return true: Switch In while loop / false: Not in while Loop.
///
bool DealWithLoopSwitch(const NodePtr &node, uint32_t dst_span, std::queue<std::pair<NodePtr, uint32_t>> search_queue);
bool DealAsLoopSwitch(const NodePtr &node, uint32_t dst_span, std::queue<std::pair<NodePtr, uint32_t>> &search_queue);

///
/// @brief Mark force unknown shape for Switch node


+ 4
- 0
ge/hybrid/executor/node_state.cc View File

@@ -355,6 +355,10 @@ void NodeState::UpdatePersistTensor() {
}
};

if (root_tensor_values_.empty()) {
return;
}

update_tensor(node_item_->root_data_);
if (iteration_count_ > 0) {
update_tensor(node_item_->enter_data_);


Loading…
Cancel
Save