Visitar URL original
[Core] Change multiproc method default to `spawn` by russellb · Pull Request #8576 · vllm-project/vllm · GitHub
Skip to content

[Core] Change multiproc method default to spawn - #8576

Closed
russellb wants to merge 1 commit into
vllm-project:mainfrom
russellb:multiproc-method
Closed

russellb wants to merge 1 commit into
vllm-project:mainfrom
russellb:multiproc-method

Conversation

@russellb

Copy link
Copy Markdown
Member

The default of fork is known to be problematic. Python itself is changing the default to spawn. The new default is expected to be in place for Python 3.14.

Python references for the change to the default:

We also have several places where this option had to be set to spawn to make tests work. The AMD code even checks and overrides the value if it's not set to spawn.

Simplify things for everyone and just default to spawn, but leave the option in place just in case, at least for now.

The default of `fork` is known to be problematic. Python itself is
changing the default to `spawn`. The new default is expected to be in
place for Python 3.14.

Python references for the change to the default:

* python/cpython#84559
* python/cpython#100618

We also have several places where this option had to be set to `spawn`
to make tests work. The AMD code even checks and overrides the value if
it's not set to `spawn`.

Simplify things for everyone and just default to `spawn`, but leave the
option in place just in case, at least for now.

Signed-off-by: Russell Bryant <rbryant@redhat.com>
@github-actions

Copy link
Copy Markdown

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@russellb

Copy link
Copy Markdown
Member Author

for reference since i was just looking around ... some other places I've seen advise against fork breaking things (multithreaded things in particular)

@russellb

Copy link
Copy Markdown
Member Author

In some private chat, it was pointed out that this will break user code using the LLM class if their code is not protected by if name == “main” so this isn’t a good idea for now at least

@russellb russellb closed this Sep 18, 2024
wenhow pushed a commit to wenhow/vllm that referenced this pull request Aug 5, 2026
…tent. (vllm-project#8576)

### What this PR does / why we need it?

To improve the quality of certain docs by revising specific content.

### Does this PR introduce _any_ user-facing change?

None

### How was this patch tested?

- vLLM version: v0.19.0
- vLLM main:
vllm-project@6f786f2

---------

Signed-off-by: Lucky1 <144669645+verylucky01@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant