Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
e2f56c30
Unverified
Commit
e2f56c30
authored
Nov 28, 2025
by
Li, Jiang
Committed by
GitHub
Nov 28, 2025
Browse files
[CPU] Update torch 2.9.1 for CPU backend (#29664)
Signed-off-by:
jiang1.li
<
jiang1.li@intel.com
>
parent
f8151b66
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
24 deletions
+16
-24
.buildkite/scripts/hardware_ci/run-cpu-test.sh
.buildkite/scripts/hardware_ci/run-cpu-test.sh
+2
-2
csrc/cpu/utils.cpp
csrc/cpu/utils.cpp
+7
-6
docker/Dockerfile.cpu
docker/Dockerfile.cpu
+1
-1
requirements/cpu-build.txt
requirements/cpu-build.txt
+2
-3
requirements/cpu.txt
requirements/cpu.txt
+4
-11
vllm/platforms/cpu.py
vllm/platforms/cpu.py
+0
-1
No files found.
.buildkite/scripts/hardware_ci/run-cpu-test.sh
View file @
e2f56c30
...
@@ -21,8 +21,8 @@ trap remove_docker_container EXIT
...
@@ -21,8 +21,8 @@ trap remove_docker_container EXIT
remove_docker_container
remove_docker_container
# Try building the docker image
# Try building the docker image
numactl
-C
"
$CORE_RANGE
"
-N
"
$NUMA_NODE
"
docker build
--tag
cpu-test-
"
$NUMA_NODE
"
--target
vllm-test
-f
docker/Dockerfile.cpu
.
numactl
-C
"
$CORE_RANGE
"
-N
"
$NUMA_NODE
"
docker build
--progress
plain
--tag
cpu-test-
"
$NUMA_NODE
"
--target
vllm-test
-f
docker/Dockerfile.cpu
.
numactl
-C
"
$CORE_RANGE
"
-N
"
$NUMA_NODE
"
docker build
--build-arg
VLLM_CPU_DISABLE_AVX512
=
"true"
--tag
cpu-test-
"
$NUMA_NODE
"
-avx2
--target
vllm-test
-f
docker/Dockerfile.cpu
.
numactl
-C
"
$CORE_RANGE
"
-N
"
$NUMA_NODE
"
docker build
--progress
plain
--build-arg
VLLM_CPU_DISABLE_AVX512
=
"true"
--tag
cpu-test-
"
$NUMA_NODE
"
-avx2
--target
vllm-test
-f
docker/Dockerfile.cpu
.
# Run the image, setting --shm-size=4g for tensor parallel.
# Run the image, setting --shm-size=4g for tensor parallel.
docker run
-itd
--cpuset-cpus
=
"
$CORE_RANGE
"
--cpuset-mems
=
"
$NUMA_NODE
"
--entrypoint
/bin/bash
-v
~/.cache/huggingface:/root/.cache/huggingface
--privileged
=
true
-e
HF_TOKEN
--env
VLLM_CPU_KVCACHE_SPACE
=
16
--env
VLLM_CPU_CI_ENV
=
1
-e
E2E_OMP_THREADS
=
"
$OMP_CORE_RANGE
"
--shm-size
=
4g
--name
cpu-test-
"
$NUMA_NODE
"
cpu-test-
"
$NUMA_NODE
"
docker run
-itd
--cpuset-cpus
=
"
$CORE_RANGE
"
--cpuset-mems
=
"
$NUMA_NODE
"
--entrypoint
/bin/bash
-v
~/.cache/huggingface:/root/.cache/huggingface
--privileged
=
true
-e
HF_TOKEN
--env
VLLM_CPU_KVCACHE_SPACE
=
16
--env
VLLM_CPU_CI_ENV
=
1
-e
E2E_OMP_THREADS
=
"
$OMP_CORE_RANGE
"
--shm-size
=
4g
--name
cpu-test-
"
$NUMA_NODE
"
cpu-test-
"
$NUMA_NODE
"
...
...
csrc/cpu/utils.cpp
View file @
e2f56c30
...
@@ -51,12 +51,13 @@ std::string init_cpu_threads_env(const std::string& cpu_ids) {
...
@@ -51,12 +51,13 @@ std::string init_cpu_threads_env(const std::string& cpu_ids) {
if
(
node_id
!=
-
1
)
{
if
(
node_id
!=
-
1
)
{
node_ids
.
insert
(
node_id
);
node_ids
.
insert
(
node_id
);
}
}
TORCH_WARN
(
node_id
==
mem_node_id
,
"CPU "
,
cpu_id
,
" is on NUMA node "
,
if
(
node_id
!=
mem_node_id
)
{
node_id
,
", but CPU "
,
omp_cpu_ids
.
front
(),
TORCH_WARN
(
"CPU "
,
cpu_id
,
" is on NUMA node "
,
node_id
,
", but CPU "
,
" is on NUMA node "
,
mem_node_id
,
omp_cpu_ids
.
front
(),
" is on NUMA node "
,
mem_node_id
,
". All CPUs should be on the same NUMA node for optimal "
". All CPUs should be on the same NUMA node for optimal "
"performance. Memory will be bound to NUMA node "
,
"performance. Memory will be bound to NUMA node "
,
mem_node_id
,
"."
);
mem_node_id
,
"."
);
}
}
}
// Concatenate all node_ids into a single comma-separated string
// Concatenate all node_ids into a single comma-separated string
if
(
!
node_ids
.
empty
())
{
if
(
!
node_ids
.
empty
())
{
...
...
docker/Dockerfile.cpu
View file @
e2f56c30
...
@@ -132,7 +132,7 @@ RUN --mount=type=bind,src=requirements/test.in,target=requirements/test.in \
...
@@ -132,7 +132,7 @@ RUN --mount=type=bind,src=requirements/test.in,target=requirements/test.in \
esac; \
esac; \
}; \
}; \
remove_packages_not_supported_on_aarch64 && \
remove_packages_not_supported_on_aarch64 && \
sed -i 's/^torch==.*/torch==2.
8.0
/g' requirements/cpu-test.in && \
sed -i 's/^torch==.*/torch==2.
9.1
/g' requirements/cpu-test.in && \
sed -i 's/torchaudio.*/torchaudio/g' requirements/cpu-test.in && \
sed -i 's/torchaudio.*/torchaudio/g' requirements/cpu-test.in && \
sed -i 's/torchvision.*/torchvision/g' requirements/cpu-test.in && \
sed -i 's/torchvision.*/torchvision/g' requirements/cpu-test.in && \
uv pip compile requirements/cpu-test.in -o requirements/cpu-test.txt --index-strategy unsafe-best-match --torch-backend cpu
uv pip compile requirements/cpu-test.in -o requirements/cpu-test.txt --index-strategy unsafe-best-match --torch-backend cpu
...
...
requirements/cpu-build.txt
View file @
e2f56c30
...
@@ -4,9 +4,8 @@ packaging>=24.2
...
@@ -4,9 +4,8 @@ packaging>=24.2
setuptools>=77.0.3,<81.0.0
setuptools>=77.0.3,<81.0.0
setuptools-scm>=8
setuptools-scm>=8
--extra-index-url https://download.pytorch.org/whl/cpu
--extra-index-url https://download.pytorch.org/whl/cpu
torch==2.8.0+cpu; platform_machine == "x86_64" or platform_machine == "s390x"
torch==2.9.1+cpu; platform_machine == "x86_64" or platform_machine == "s390x"
torch==2.9.0; platform_system == "Darwin"
torch==2.9.1; platform_system == "Darwin" or platform_machine == "ppc64le" or platform_machine == "aarch64"
torch==2.8.0; platform_machine == "ppc64le" or platform_machine == "aarch64"
scons; platform_machine == "aarch64" # needed to build Arm Compute Library (ACL)
scons; platform_machine == "aarch64" # needed to build Arm Compute Library (ACL)
wheel
wheel
jinja2>=3.1.6
jinja2>=3.1.6
...
...
requirements/cpu.txt
View file @
e2f56c30
...
@@ -4,25 +4,18 @@
...
@@ -4,25 +4,18 @@
numba == 0.61.2; platform_machine != "s390x" # Required for N-gram speculative decoding
numba == 0.61.2; platform_machine != "s390x" # Required for N-gram speculative decoding
# Dependencies for CPUs
# Dependencies for CPUs
packaging>=24.2
setuptools>=77.0.3,<81.0.0
--extra-index-url https://download.pytorch.org/whl/cpu
--extra-index-url https://download.pytorch.org/whl/cpu
torch==2.8.0+cpu; platform_machine == "x86_64" or platform_machine == "s390x"
torch==2.9.1+cpu; platform_machine == "x86_64" or platform_machine == "s390x"
torch==2.9.0; platform_system == "Darwin"
torch==2.9.1; platform_system == "Darwin" or platform_machine == "ppc64le" or platform_machine == "aarch64"
torch==2.8.0; platform_machine == "ppc64le" or platform_machine == "aarch64"
# required for the image processor of minicpm-o-2_6, this must be updated alongside torch
# required for the image processor of minicpm-o-2_6, this must be updated alongside torch
torchaudio; platform_machine != "ppc64le" and platform_machine != "s390x"
torchaudio; platform_machine != "s390x"
torchaudio==2.8.0; platform_machine == "ppc64le"
# required for the image processor of phi3v, this must be updated alongside torch
# required for the image processor of phi3v, this must be updated alongside torch
torchvision; platform_machine != "ppc64le" and platform_machine != "s390x"
torchvision; platform_machine != "s390x"
torchvision==0.23.0; platform_machine == "ppc64le"
datasets # for benchmark scripts
# Intel Extension for PyTorch, only for x86_64 CPUs
# Intel Extension for PyTorch, only for x86_64 CPUs
intel-openmp==2024.2.1; platform_machine == "x86_64"
intel-openmp==2024.2.1; platform_machine == "x86_64"
triton==3.2.0; platform_machine == "x86_64" # Triton is required for torch 2.6+cpu, as it is imported in torch.compile.
# Use this to gather CPU info and optimize based on ARM Neoverse cores
# Use this to gather CPU info and optimize based on ARM Neoverse cores
py-cpuinfo; platform_machine == "aarch64"
py-cpuinfo; platform_machine == "aarch64"
vllm/platforms/cpu.py
View file @
e2f56c30
...
@@ -384,7 +384,6 @@ class CpuPlatform(Platform):
...
@@ -384,7 +384,6 @@ class CpuPlatform(Platform):
@
classmethod
@
classmethod
def
is_pin_memory_available
(
cls
)
->
bool
:
def
is_pin_memory_available
(
cls
)
->
bool
:
logger
.
warning
(
"Pin memory is not supported on CPU."
)
return
False
return
False
@
classmethod
@
classmethod
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment