MCPcopy
hub / github.com/hpcaitech/ColossalAI / empty_cache

Method empty_cache

colossalai/accelerator/cpu_accelerator.py:160–164  ·  view source on GitHub ↗

Releases all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi.

(self)

Source from the content-addressed store, hash-verified

158 # =======================
159
160 def empty_cache(self) -> None:
161 """
162 Releases all unoccupied cached memory currently held by the caching allocator so that those can be used in other GPU application and visible in nvidia-smi.
163 """
164 raise RuntimeError("this method is not supported for cpu accelerator")
165
166 def memory_stats(self, device=None) -> Dict[str, Any]:
167 """

Callers 15

trainFunction · 0.45
make_experienceMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
trainFunction · 0.45
_init_region_dataMethod · 0.45
from_pretrainedMethod · 0.45
apply_load_balanceFunction · 0.45
quantize_modelFunction · 0.45
init_modelMethod · 0.45
clear_spec_decMethod · 0.45

Calls

no outgoing calls