MCPcopy Create free account
hub / github.com/apache/tvm / _kill_child_processes

Function _kill_child_processes

python/tvm/runtime/disco/process_pool.py:157–177  ·  view source on GitHub ↗

Kill all child processes recursively for a given pid. Parameters ---------- pid : int The given parameter id.

(pid)

Source from the content-addressed store, hash-verified

155
156
157def _kill_child_processes(pid):
158 """Kill all child processes recursively for a given pid.
159
160 Parameters
161 ----------
162 pid : int
163 The given parameter id.
164 """
165 import psutil # pylint: disable=import-outside-toplevel
166
167 try:
168 parent = psutil.Process(pid)
169 children = parent.children(recursive=True)
170 except psutil.NoSuchProcess:
171 return
172
173 for process in children:
174 try:
175 process.kill()
176 except psutil.NoSuchProcess:
177 pass
178
179
180@register_global_func("runtime.disco.create_process_pool")

Callers 1

killMethod · 0.85

Calls 1

killMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…