MCPcopy Index your code
hub / github.com/apache/tvm / _worker_run

Method _worker_run

python/tvm/support/popen_pool.py:414–432  ·  view source on GitHub ↗

Internal thread runner.

(self, fn, args, kwargs)

Source from the content-addressed store, hash-verified

412 self._shutdown = True
413
414 def _worker_run(self, fn, args, kwargs):
415 """Internal thread runner."""
416 self._lock.acquire()
417 tid = threading.get_ident()
418 if tid not in self._worker_map:
419 proc = PopenWorker(
420 self._initializer,
421 self._initargs,
422 self._maximum_process_uses,
423 self._stdout,
424 self._stderr,
425 )
426 self._worker_map[tid] = proc
427 else:
428 proc = self._worker_map[tid]
429 self._lock.release()
430
431 proc.send(fn, args, kwargs, self._timeout)
432 return proc.recv()
433
434 def _worker_run_with_error_catching(self, fn, args, kwargs) -> MapResult:
435 # pylint: disable=broad-except

Callers 2

submitMethod · 0.95

Calls 4

sendMethod · 0.95
recvMethod · 0.95
PopenWorkerClass · 0.85
releaseMethod · 0.45

Tested by

no test coverage detected