r""" Move internal buffers of the ExponentialMovingAverage to pinned memory. Useful for non-blocking transfers for offloading EMA params to the host.
(self)
| 779 | param.data.copy_(s_param.to(param.device).data) |
| 780 | |
| 781 | def pin_memory(self) -> None: |
| 782 | r""" |
| 783 | Move internal buffers of the ExponentialMovingAverage to pinned memory. Useful for non-blocking transfers for |
| 784 | offloading EMA params to the host. |
| 785 | """ |
| 786 | |
| 787 | self.shadow_params = [p.pin_memory() for p in self.shadow_params] |
| 788 | |
| 789 | def to(self, device=None, dtype=None, non_blocking=False) -> None: |
| 790 | r""" |
no outgoing calls
no test coverage detected