(self, memo)
| 757 | return self.to(device="xpu" if device is None else device, non_blocking=non_blocking) |
| 758 | |
| 759 | def __deepcopy__(self, memo): |
| 760 | # adjust this if new arguments are added to the constructor |
| 761 | new_instance = type(self).__new__( |
| 762 | type(self), |
| 763 | data=copy.deepcopy(self.data, memo), |
| 764 | requires_grad=self.requires_grad, |
| 765 | has_fp16_weights=self.has_fp16_weights, |
| 766 | CB=copy.deepcopy(self.CB, memo), |
| 767 | SCB=copy.deepcopy(self.SCB, memo), |
| 768 | ) |
| 769 | return new_instance |
| 770 | |
| 771 | @overload |
| 772 | def to( |