Skip to content

Commit

Permalink
Revert "Remove redundant destructor calls"
Browse files Browse the repository at this point in the history
This reverts commit 6b4514b.
  • Loading branch information
kzawora-intel committed Sep 25, 2024
1 parent 6b4514b commit cf48997
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vllm/executor/habana_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def check_health(self) -> None:
def shutdown(self) -> None:
self.driver_worker.shutdown_inc()

def __del__(self):
self.shutdown()


class HabanaExecutorAsync(HabanaExecutor, ExecutorAsyncBase):

Expand Down
3 changes: 3 additions & 0 deletions vllm/worker/habana_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ def list_prompt_adapters(self) -> Set[int]:
def shutdown_inc(self):
self.model_runner.shutdown_inc()

def __del__(self):
self.shutdown_inc()

@property
def max_model_len(self) -> int:
return self.model_config.max_model_len
Expand Down

0 comments on commit cf48997

Please sign in to comment.