Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make exit_flag verification for ascend more general #2588

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lmdeploy/pytorch/engine/model_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,7 @@ def _exit_by_sending_exit_flag(rank: int, agent: TPModelAgent):
return

import sys
if agent.backend_config.device_type == 'ascend' \
and 'uvicorn.server' in sys.modules:
if 'torch_npu' in sys.modules and 'uvicorn.server' in sys.modules:
# Workaround for CLI serve mode with device_type ascend:
# using uvicorn server causes ascend low-level backend of subprocesses
# corrupted, and using _broadcast_inputs in this case leads to
Expand Down
Loading