class_docstr: Lazily serves copies of a tensor to requested devices.  Copies are cached per-device.
class_docstr_tok: ["Lazily","serves","copies","of","a","tensor","to","requested","devices",".","Copies","are","cached","per-device","."]
code: def get(self, device) -> torch.Tensor:
      retval = self._per_device_tensors.get(device, None)
      if retval is None:
          retval = self.master.to(
              device=device, non_blocking=True, copy=True
          )
          self._per_device_tensors[device] = retval
      return retval
  
file_path: insightface/recognition/vpl/utils/utils_amp.py
imports: from typing import Dict, List
  import torch
  from torch._six import container_abcs
  from torch.cuda.amp import GradScaler
label_desc: Use image node_id 2 for calling the _MultiDeviceReplicator obj's underlying member method code with example usage: obj.get(device) and returns: retval