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

Method Close

tensorflow/compiler/xla/python/tpu_driver/grpc_tpu_driver.cc:1035–1052  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033}
1034
1035Status GrpcTpuDriver::Close() {
1036 auto stub = CreateTpuDriverStub(config_, creds_);
1037 ::grpc::ClientContext ctx;
1038 ctx.set_fail_fast(false);
1039 ctx.set_deadline(std::chrono::system_clock::now() + std::chrono::seconds(10));
1040 CloseRequest req;
1041 req.set_client_id(client_id_);
1042 CloseResponse resp;
1043 ::grpc::Status status = stub->Close(&ctx, req, &resp);
1044 if (!status.ok()) {
1045 return xla::Status(tensorflow::error::Code(status.error_code()),
1046 absl::StrCat("Failed to close TPU driver. Error was: ",
1047 status.error_message(),
1048 ". Details: ", status.error_details()));
1049 }
1050 closed_ = true;
1051 return Status::OK();
1052}
1053} // namespace
1054
1055xla::StatusOr<std::unique_ptr<TpuDriver>> CreateGrpcTpuDriver(

Callers 3

WriteToPathMethod · 0.45
~RecordingTpuDriverMethod · 0.45

Calls 4

error_codeMethod · 0.80
StatusClass · 0.50
StrCatFunction · 0.50
okMethod · 0.45

Tested by

no test coverage detected