MCPcopy
hub / github.com/ModelTC/LightLLM / stop_mps

Function stop_mps

lightllm/utils/device_utils.py:136–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134
135
136def stop_mps():
137 if is_mps_running():
138 result = subprocess.run("echo quit | nvidia-cuda-mps-control", shell=True)
139 logger.info("Stopping MPS...")
140 if result.returncode == 0:
141 logger.info("MPS stopped successfully.")
142 else:
143 logger.warning("Failed to stop MPS.")
144 else:
145 logger.info("MPS is not running, no need to stop.")
146
147
148def enable_mps():

Callers 1

Calls 2

is_mps_runningFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected