Skip to content

Commit

Permalink
only profile driver worker stop/start
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mkeralapura committed Sep 5, 2024
1 parent 6f3061b commit b6f8764
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vllm/worker/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def __init__(
self.profiler = None

def start_profile(self):
if self.profiler is None:
if self.is_driver_worker and self.profiler is None:
raise RuntimeError("Profiler is not enabled.")
self.profiler.start()

def stop_profile(self):
if self.profiler is None:
if self.is_driver_worker and self.profiler is None:
raise RuntimeError("Profiler is not enabled.")
self.profiler.stop()

Expand Down

0 comments on commit b6f8764

Please sign in to comment.