(message, force=False)
| 33 | PA_CORRECTNESS_TEST= False |
| 34 | |
| 35 | def see_memory_usage(message, force=False): |
| 36 | if not force: |
| 37 | return |
| 38 | dist.barrier() |
| 39 | if dist.get_rank() == 0: |
| 40 | print(message) |
| 41 | print("Memory Allocated ", torch.cuda.memory_allocated()/(1024*1024*1024), "GigaBytes") |
| 42 | print("Max Memory Allocated ", torch.cuda.max_memory_allocated()/(1024*1024*1024), "GigaBytes") |
| 43 | print("Cache Allocated ", torch.cuda.memory_cached()/(1024*1024*1024), "GigaBytes") |
| 44 | print("Max cache Allocated ", torch.cuda.max_memory_cached()/(1024*1024*1024), "GigaBytes") |
| 45 | print(" ") |
| 46 | #input("Press Any Key To Continue ..") |
| 47 | |
| 48 | |
| 49 | from .initialize import get_data_parallel_rank |
nothing calls this directly
no outgoing calls
no test coverage detected