# Oldpan/Pytorch-Memory-Utils

pytorch memory track code

Repository: https://github.com/Oldpan/Pytorch-Memory-Utils
Canonical: https://ross.abutalabs.com/products/pytorch-memory-utils
Language: Python
License Family: other
Topics: pytorch, memory, gpu
Last push: 2021-05-04T14:11:27+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3008, "days_push": 1947, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1012, forks 152 (observed 2026-08-28T04:03:13.449052+00:00)

## What it is
A small set of Python scripts for tracking GPU memory usage in PyTorch, including per-line tensor allocation reports and model parameter/intermediate-variable size estimation. It is a lightweight copy-in utility rather than an installable package.

## Use cases
- track gpu memory usage during pytorch training
- find which lines of code allocate the most gpu memory
- estimate the memory footprint of a pytorch model
- debug cuda out of memory errors
- measure intermediate variable memory with and without backward pass

## When to choose
- you need a quick, dependency-free script to profile pytorch gpu memory
- you want line-by-line tensor allocation reports during training
- you need to estimate model parameter and activation memory before training

## When to avoid
- you need a maintained installable profiler with active updates
- you use frameworks other than pytorch
- you need cpu memory profiling or multi-gpu aggregation

## Facets
- artifact type: library
- maturity: maintenance
- function: monitoring, developer-tools
- domain: deep-learning, developer-tools, performance
- platform: python
- tags: pytorch, gpu-memory, memory-profiling, debugging, gpu

## Member repositories
- Oldpan/Pytorch-Memory-Utils (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:13.449052+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:11:43.302517+00:00, confidence not recorded.
  - readme: https://github.com/Oldpan/Pytorch-Memory-Utils (fetched 2026-08-28T04:03:13.449052+00:00, sha 611337fa9c45)
- Data as of 2026-08-30T08:39:29.467469+00:00.
