MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / _clear_cuda_cache

Function _clear_cuda_cache

agents/master-coordinator/scripts/llm_parser.py:359–366  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

357
358
359def _clear_cuda_cache() -> None:
360 if torch is None or not hasattr(torch, "cuda"):
361 return
362 try:
363 if torch.cuda.is_available():
364 torch.cuda.empty_cache()
365 except Exception:
366 pass
367
368
369def _resolve_local_llm_device(force_device: Optional[str] = None) -> str:

Callers 3

_evict_local_llm_backendFunction · 0.85
_get_local_llm_backendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected