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

Method CreateCall

tensorflow/core/distributed_runtime/rpc/grpc_rpc_factory.cc:167–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167void GrpcRPCFactory::CreateCall(const Tensor& request_t, const bool try_rpc,
168 int index, CallContainer<GrpcCall>* container,
169 Tensor* response_t, Tensor* status_code_t,
170 Tensor* status_message_t) {
171 auto request = request_t.flat<string>();
172 auto get_request_ptr = [&request](int64 ix) -> const string* {
173 return (request.size() > 1) ? &(request(ix)) : &(request(0));
174 };
175 auto response = response_t->flat<string>();
176 int32* status_code_ptr = nullptr;
177 string* status_message_ptr = nullptr;
178 if (try_rpc) {
179 status_code_ptr = status_code_t->flat<int32>().data();
180 status_message_ptr = status_message_t->flat<string>().data();
181 }
182 container->RegisterCall(container, index, try_rpc, get_request_ptr(index),
183 &response(index),
184 (try_rpc) ? &status_code_ptr[index] : nullptr,
185 (try_rpc) ? &status_message_ptr[index] : nullptr);
186}
187
188void GrpcRPCFactory::StartCall(const Tensor& address_t, const Tensor& method_t,
189 GrpcCall* call) {

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
dataMethod · 0.45
RegisterCallMethod · 0.45

Tested by

no test coverage detected