tensorflow/core/common_runtime/ring_alg.cc
// Each CollectiveOp implementation is free to define its own
// BufRendezvous key format.  This function produces the key used by
// RingAlg instances.  Note that the exec_key will differentiate between
// different instances consequently we don't need to further differentiate
// between subclasses of RingAlg.
Each CollectiveOp implementation is free to define its own
BufRendezvous key format.  This function produces the key used by
RingAlg instances.  Note that the exec_key will differentiate between
different instances consequently we don't need to further differentiate
between subclasses of RingAlg.
Each CollectiveOp implementation is free to define its own BufRendezvous key format . This function produces the key used by RingAlg instances . Note that the exec_key will differentiate between different instances consequently we don ' t need to further differentiate between subclasses of RingAlg .
string RingAlgBufKey(const string& name, const string& exec_key, int pass,
                     int section, int source_rank) {
  if (READABLE_KEYS) {
    return strings::StrCat(name, "(", exec_key, "):pass(", pass, "):section(",
                           section, "):srcrank(", source_rank, ")");
  } else {
    return strings::StrCat(exec_key, ":", pass, ":", section, ":", source_rank);
  }
}
string RingAlgBufKey ( const string & name , const string & exec_key , int pass , int section , int source_rank ) { if ( READABLE_KEYS ) { return strings :: StrCat ( name , " " , exec_key , " " , pass , " " , section , " " , source_rank , " " ) ; } else { return strings :: StrCat ( exec_key , " " , pass , " " , section , " " , source_rank ) ; } }
Each CollectiveOp implementation is free to define its own
BufRendezvous key format.
Each CollectiveOp implementation is free to define its own BufRendezvous key format .
// TODO(b/78352018): Try out some kind of denser encoding, e.g. 128 bit // hash.