(self)
| 88 | if not self.profile_memory: |
| 89 | return |
| 90 | |
| 91 | reset_peak_memory_stats = getattr(torch_device_module, "reset_peak_memory_stats", None) |
| 92 | max_memory_allocated = getattr(torch_device_module, "max_memory_allocated", None) |
| 93 | if reset_peak_memory_stats is None or max_memory_allocated is None: |
| 94 | return |
| 95 | |
| 96 | try: |
| 97 | if stack: |
| 98 | peak_allocated, peak_reserved = self._read_memory_peak() |
| 99 | for context in stack: |
nothing calls this directly
no test coverage detected