MCPcopy Create free account
hub / github.com/VincentHancoder/SSGD / AvoidOOM

Class AvoidOOM

mmdet/utils/memory.py:79–209  ·  view source on GitHub ↗

Try to convert inputs to FP16 and CPU if got a PyTorch's CUDA Out of Memory error. It will do the following steps: 1. First retry after calling `torch.cuda.empty_cache()`. 2. If that still fails, it will then retry by converting inputs to FP16. 3. If that still

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

test_avoidoomFunction · 0.90
memory.pyFile · 0.85

Calls

no outgoing calls

Tested by 1

test_avoidoomFunction · 0.72