MCPcopy
hub / github.com/zai-org/ChatGLM2-6B / torch_gc

Function torch_gc

api.py:11–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def torch_gc():
12 if torch.cuda.is_available():
13 with torch.cuda.device(CUDA_DEVICE):
14 torch.cuda.empty_cache()
15 torch.cuda.ipc_collect()
16
17
18app = FastAPI()

Callers 1

create_itemFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected