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

Function XrtGetUniqueWireID

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

This gets a unique wire ID. We add a random identifier so that if the worker has other clients that it is servicing, we don't have any collision.

Source from the content-addressed store, hash-verified

326// This gets a unique wire ID. We add a random identifier so that if the
327// worker has other clients that it is servicing, we don't have any collision.
328std::string XrtGetUniqueWireID() {
329 static uint64 random_seed = random::New64();
330 static std::atomic<int64> wireid(0);
331 return absl::StrCat(random_seed, "_", ++wireid);
332}
333
334static std::string GetReceiverDevice(XrtTfContext* context,
335 int recv_device_id) {

Callers 3

CompileMethod · 0.85
SendTensorMethod · 0.85
RecvTensorMethod · 0.85

Calls 2

New64Function · 0.85
StrCatFunction · 0.50

Tested by

no test coverage detected