r""" Move internal buffers of the ExponentialMovingAverage to pinned memory. Useful for non-blocking transfers for offloading EMA params to the host.
(self)
| 486 | param.data.copy_(s_param.to(param.device).data) |
| 487 | |
| 488 | def pin_memory(self) -> None: |
| 489 | r""" |
| 490 | Move internal buffers of the ExponentialMovingAverage to pinned memory. Useful for non-blocking transfers for |
| 491 | offloading EMA params to the host. |
| 492 | """ |
| 493 | |
| 494 | self.shadow_params = [p.pin_memory() for p in self.shadow_params] |
| 495 | |
| 496 | def to(self, device=None, dtype=None, non_blocking=False) -> None: |
| 497 | r"""Move internal buffers of the ExponentialMovingAverage to `device`. |
no outgoing calls
no test coverage detected