(self, tensor, group, partition_meta=None)
| 621 | class PartitionedTensor: |
| 622 | |
| 623 | def __init__(self, tensor, group, partition_meta=None): |
| 624 | super().__init__() |
| 625 | |
| 626 | self.group = group |
| 627 | self.num_parts = dist.get_world_size(group=self.group) |
| 628 | self.rank = dist.get_rank(group=self.group) |
| 629 | |
| 630 | self.orig_size = list(tensor.size()) |
| 631 | self.orig_device = tensor.device |
| 632 | self.local_data, self.partition = self._partition_tensor(tensor) |
| 633 | |
| 634 | @classmethod |
| 635 | def from_meta(cls, meta, local_part, group, device=get_accelerator().device_name()): |
nothing calls this directly
no test coverage detected