Handle error from propagate_rt_info (#11773)
This commit is contained in:
parent
922e32e2f1
commit
421520bda0
@ -426,4 +426,4 @@ bool op::v8::Slice::evaluate_label(TensorLabelVector& output_labels) const {
|
||||
if (!slice_input_check(this))
|
||||
return false;
|
||||
return default_label_evaluator(this, output_labels);
|
||||
}
|
||||
}
|
||||
|
@ -1203,8 +1203,13 @@ void propagate_rt_info(Node* node, const Output<Node>& final_port) {
|
||||
for (auto& in : output.get_target_inputs()) {
|
||||
if (stop_nodes.count(in.get_node()))
|
||||
continue;
|
||||
auto consumer = in.get_node()->shared_from_this();
|
||||
copy_runtime_info({curr_node, consumer}, consumer);
|
||||
try {
|
||||
auto consumer = in.get_node()->shared_from_this();
|
||||
copy_runtime_info({curr_node, consumer}, consumer);
|
||||
} catch (const std::bad_weak_ptr&) {
|
||||
// Exception can be thrown, if `shared_from_this()` was called during node creation.
|
||||
// Continue propagation for other nodes.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user