class_docstr: A `TfmdDL` which splits a batch into equal size pieces for each worker
class_docstr_tok: ["A","`","TfmdDL","`","which","splits","a","batch","into","equal","size","pieces","for","each","worker"]
docstr: Broadcasts t from rank `rank` to all other ranks. Returns t so t is same for all ranks after call.
docstr_tok: ["Broadcasts","t","from","rank","`","rank","`","to","all","other","ranks",".","Returns","t","so","t","is","same","for","all","ranks","after","call","."]
code: def _broadcast(self, t, rank):
      "Broadcasts t from rank `rank` to all other ranks. Returns t so t is same for all ranks after call."
      t = LongTensor(t).cuda()  # nccl only works with cuda tensors
      torch.distributed.broadcast(t, rank)
      return t.cpu().tolist()
  
imports: from __future__ import annotations
  from .basics import *
  from .callback.progress import ProgressCallback
  from torch.nn.parallel import DistributedDataParallel, DataParallel
  from .data.load import _FakeLoader, _loaders
  from .optimizer import OptimWrapper
label_desc: Use image node_id 2 for calling the DistributedDL obj's underlying member method code with example usage: obj._broadcast(t, rank) and returns: t