MCPcopy Index your code
hub / github.com/NVIDIA/TensorRT-LLM / sleep

Method sleep

tensorrt_llm/executor/ray_gpu_worker.py:259–274  ·  view source on GitHub ↗
(self, sleep_tags: List[str])

Source from the content-addressed store, hash-verified

257
258 @control_action_decorator
259 def sleep(self, sleep_tags: List[str]):
260 if not self.llm_args.enable_sleep:
261 raise ValueError(
262 "Sleep feature is not enabled, please set enable_sleep=True in the LLM arguments."
263 )
264 try:
265 tags = verify_sleep_wakeup_tags(sleep_tags)
266 logger.info(f"Sleep: {tags}")
267 torch.cuda.synchronize()
268 release_with_tag(*tags)
269 torch.cuda.synchronize()
270 gc.collect()
271 torch.cuda.empty_cache()
272 except Exception as e:
273 logger.error(f"Encountered an error in sleep: {e}")
274 raise e
275
276 @control_action_decorator
277 def wakeup(self, wakeup_tags: List[str]):

Callers 15

send_messageFunction · 0.80
get_wheel_from_packageFunction · 0.80
cleanup_process_treeFunction · 0.80
wait_for_serverFunction · 0.80
engine_dirFunction · 0.80
collect_statusFunction · 0.80
generate_and_sleepFunction · 0.80
stress_testFunction · 0.80
run_aiperf_processFunction · 0.80

Calls 5

verify_sleep_wakeup_tagsFunction · 0.90
release_with_tagFunction · 0.90
synchronizeMethod · 0.80
infoMethod · 0.45
errorMethod · 0.45