Browse Source

update

tags/v1.2.0
chuxing 3 years ago
parent
commit
409bf6c35c
2 changed files with 20 additions and 1 deletions
  1. +1
    -1
      ge/hybrid/executor/node_state.cc
  2. +19
    -0
      ge/hybrid/model/node_item.cc

+ 1
- 1
ge/hybrid/executor/node_state.cc View File

@@ -61,7 +61,7 @@ Status ShapeInferenceState::UpdateInputShape(int idx, const GeTensorDesc &target
tensor_desc->SetShape(target.GetShape());
tensor_desc->SetOriginShape(target.GetOriginShape());
(void) TensorUtils::SetSize(*tensor_desc, tensor_size);
if (--num_pending_shapes_ == 0) {
if (--num_pending_shapes_ <= 0) {
ready_cv_.notify_all();
}



+ 19
- 0
ge/hybrid/model/node_item.cc View File

@@ -163,6 +163,25 @@ Status NodeItem::ResolveDynamicState() {

Status NodeItem::ResolveStaticInputsAndOutputs() {
for (int i = 0; i < num_inputs; ++i) {
// Data has unconnected input but set by framework
if (node_type != DATA) {
int origin_index = i;
if (has_optional_inputs) {
origin_index = input_desc_indices_[i];
}
auto in_data_anchor = node->GetInDataAnchor(origin_index);
GE_CHECK_NOTNULL(in_data_anchor);

// If no node was connected to the current input anchor
// increase num_static_input_shapes in case dead wait in ShapeInferenceState::AwaitShapesReady
if (in_data_anchor->GetPeerOutAnchor() == nullptr ||
in_data_anchor->GetPeerOutAnchor()->GetOwnerNode() == nullptr) {
num_static_input_shapes++;
is_input_shape_static_.push_back(true);
GELOGW("[%s] Peer node of input[%d] is empty", NodeName().c_str(), i);
continue;
}
}
const auto &input_desc = MutableInputDesc(i);
GE_CHECK_NOTNULL(input_desc);
if (input_desc->MutableShape().IsUnknownShape()) {


Loading…
Cancel
Save