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

[WIP][Core][Refactor] move vllm/model_executor/parallel_utils into vllm/distributed and vllm/device_communicators #3950

Merged
merged 22 commits into from
Apr 10, 2024

Conversation

youkaichao
Copy link
Member

I don't place vllm/device_communicators under vllm/distributed/device_communicators, because device communicators can also be used in a single process.

Main idea of the change:

vllm/model_executor/parallel_utils/parallel_state.py and vllm/model_executor/parallel_utils/communication_op.py --> vllm/distributed.py

the rest: --> vllm/device_communicators

Seek for suggestions @zhuohan123 , let's discuss the structure of refactor first, then fix test and linter.

Copy link
Member

@zhuohan123 zhuohan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I feel it's better to not lay all the files flat under vllm/. Let's create another directory?

vllm/utils.py Outdated
Comment on lines 475 to 477
from typing import Sequence

import torch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move the import to the top?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or move the utils to vllm/distributed/utils.py

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do linter later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a distributed folder for parallel_state.py and distributed.py?

@youkaichao youkaichao requested a review from zhuohan123 April 10, 2024 15:53
@youkaichao youkaichao merged commit 63e7176 into vllm-project:main Apr 10, 2024
35 checks passed
@youkaichao youkaichao deleted the move_parallel_utils branch April 10, 2024 22:33
SageMoore pushed a commit to neuralmagic/nm-vllm that referenced this pull request Apr 11, 2024
…ect#3950)

[WIP][Core][Refactor] move vllm/model_executor/parallel_utils into vllm/distributed and vllm/device_communicators (vllm-project#3950)
andy-neuma pushed a commit to neuralmagic/nm-vllm that referenced this pull request Apr 12, 2024
…ect#3950)

[WIP][Core][Refactor] move vllm/model_executor/parallel_utils into vllm/distributed and vllm/device_communicators (vllm-project#3950)
z103cb pushed a commit to z103cb/opendatahub_vllm that referenced this pull request Apr 22, 2024
…ect#3950)

[WIP][Core][Refactor] move vllm/model_executor/parallel_utils into vllm/distributed and vllm/device_communicators (vllm-project#3950)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants