MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / ReportError

Method ReportError

tensorflow/compiler/xrt/client/xrt_tf_client.cc:205–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void XrtTfContext::ReportError(absl::Span<const OperationId> op_ids,
206 Status status) {
207 auto shared_error = std::make_shared<Status>(status);
208 absl::flat_hash_set<OperationId> visited(op_ids.begin(), op_ids.end());
209 std::stack<Operation*> stack;
210 for (OperationId op_id : op_ids) {
211 stack.push(LookupOperation(op_id));
212 }
213 while (!stack.empty()) {
214 Operation* op = stack.top();
215 stack.pop();
216 VLOG(10) << "Reporting error for " << op->id;
217 for (const std::shared_ptr<XrtRecvTensorFuture>& future :
218 op->tensor_futures) {
219 VLOG(10) << "Reporting error for " << op->id << " future";
220 future->call_options_.StartCancel();
221 future->Notify(status);
222 }
223 for (OperationId consumer_id : op->consumers) {
224 Operation* consumer = LookupOperation(consumer_id);
225 stack.push(consumer);
226 }
227 DeleteOperation(op->id);
228 }
229}
230
231XrtTfContext::Operation* XrtTfContext::AddOperation() {
232 OperationId id = ++next_op_id_;

Callers 1

SendTensorMethod · 0.45

Calls 7

beginMethod · 0.45
endMethod · 0.45
pushMethod · 0.45
emptyMethod · 0.45
popMethod · 0.45
StartCancelMethod · 0.45
NotifyMethod · 0.45

Tested by

no test coverage detected