Home / Function/ print_detailed_memory() — pytorch Function Reference

print_detailed_memory() — pytorch Function Reference

Architecture documentation for the print_detailed_memory() function in dataloader_benchmark.py from the pytorch codebase.

Entity Profile

Dependency Diagram

graph TD
  c22b6a75_ea7e_b62a_7b3e_6da190f92f55["print_detailed_memory()"]
  f6150286_ce63_72f2_12ae_6ae1460174f5["benchmark_dataloader()"]
  f6150286_ce63_72f2_12ae_6ae1460174f5 -->|calls| c22b6a75_ea7e_b62a_7b3e_6da190f92f55
  style c22b6a75_ea7e_b62a_7b3e_6da190f92f55 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/data/dataloader_benchmark.py lines 56–71

def print_detailed_memory():
    """Print detailed memory information."""
    process = psutil.Process()
    print("\nDetailed memory information:")
    try:
        print(
            f"  USS (Unique Set Size): {process.memory_full_info().uss / (1024 * 1024):.2f} MB"
        )
        print(
            f"  PSS (Proportional Set Size): {process.memory_full_info().pss / (1024 * 1024):.2f} MB"
        )
        print(
            f"  RSS (Resident Set Size): {process.memory_info().rss / (1024 * 1024):.2f} MB"
        )
    except Exception:
        print("  Detailed memory info not available")

Domain

Subdomains

Frequently Asked Questions

What does print_detailed_memory() do?
print_detailed_memory() is a function in the pytorch codebase.
What calls print_detailed_memory()?
print_detailed_memory() is called by 1 function(s): benchmark_dataloader.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free