[Bugfix] Avoid OpenMP thread reallocation in CPU torch compile#37391
Merged
jikunshang merged 1 commit intovllm-project:mainfrom Mar 18, 2026
Merged
[Bugfix] Avoid OpenMP thread reallocation in CPU torch compile#37391jikunshang merged 1 commit intovllm-project:mainfrom
jikunshang merged 1 commit intovllm-project:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request modifies the CPU platform's torch.compile configuration to address an issue with OpenMP thread reallocation that can break thread binding. The change sets the cpp.dynamic_threads option to True in the inductor compile configuration. This makes the number of threads a dynamic argument to the compiled kernels, rather than a hardcoded value. The change is confined to the CPU platform configuration and appears to correctly solve the described problem.
jikunshang
approved these changes
Mar 18, 2026
khluu
pushed a commit
that referenced
this pull request
Mar 18, 2026
Signed-off-by: jiang1.li <jiang1.li@intel.com> (cherry picked from commit 2618012)
wendyliu235
pushed a commit
to wendyliu235/vllm-public
that referenced
this pull request
Mar 18, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
5 tasks
fxdawnn
pushed a commit
to fxdawnn/vllm
that referenced
this pull request
Mar 19, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
maoxx241
pushed a commit
to maoxx241/vllm
that referenced
this pull request
Mar 24, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com> (cherry picked from commit 2618012)
SouthWest7
pushed a commit
to SouthWest7/vllm
that referenced
this pull request
Mar 27, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
khairulkabir1661
pushed a commit
to khairulkabir1661/vllm
that referenced
this pull request
Mar 27, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
Monishver11
pushed a commit
to Monishver11/vllm
that referenced
this pull request
Mar 27, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com> Signed-off-by: Monishver Chandrasekaran <monishverchandrasekaran@gmail.com>
JiantaoXu
pushed a commit
to JiantaoXu/vllm
that referenced
this pull request
Mar 28, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
vrdn-23
pushed a commit
to vrdn-23/vllm
that referenced
this pull request
Mar 30, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com> Signed-off-by: Vinay Damodaran <vrdn@hey.com>
EricccYang
pushed a commit
to EricccYang/vllm
that referenced
this pull request
Apr 1, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com> Signed-off-by: EricccYang <yangyang4991@gmail.com>
liuchenbing2026
pushed a commit
to liuchenbing2026/vllm
that referenced
this pull request
Apr 4, 2026
…project#37391) Signed-off-by: jiang1.li <jiang1.li@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
CPU torch compile will generate code with
num_threads()by default, which causes OpenMP thread reallocation and breaks thread binding. This PR disabled it.Test Plan
CI tests
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.