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
f355ad54
Unverified
Commit
f355ad54
authored
Dec 12, 2025
by
Fadi Arafeh
Committed by
GitHub
Dec 12, 2025
Browse files
[CPU][FIX] Fix build failures on Arm CPUs with torch nightly (#30481)
Signed-off-by:
Fadi Arafeh
<
fadi.arafeh@arm.com
>
parent
042da732
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
cmake/utils.cmake
cmake/utils.cmake
+14
-9
vllm/platforms/cpu.py
vllm/platforms/cpu.py
+10
-4
No files found.
cmake/utils.cmake
View file @
f355ad54
...
@@ -140,16 +140,21 @@ function(vllm_prepare_torch_gomp_shim TORCH_GOMP_SHIM_DIR)
...
@@ -140,16 +140,21 @@ function(vllm_prepare_torch_gomp_shim TORCH_GOMP_SHIM_DIR)
run_python
(
_VLLM_TORCH_GOMP_PATH
run_python
(
_VLLM_TORCH_GOMP_PATH
"
"
import os, glob
import os, glob
try:
import torch
import torch
torch_pkg = os.path.dirname(torch.__file__)
torch_pkg = os.path.dirname(torch.__file__)
site_root = os.path.dirname(torch_pkg)
site_root = os.path.dirname(torch_pkg)
torch_libs = os.path.join(site_root, 'torch.libs')
# Search both torch.libs and torch/lib
print(glob.glob(os.path.join(torch_libs, 'libgomp-*.so*'))[0])
roots = [os.path.join(site_root, 'torch.libs'), os.path.join(torch_pkg, 'lib')]
except:
candidates = []
print('')
for root in roots:
if not os.path.isdir(root):
continue
candidates.extend(glob.glob(os.path.join(root, 'libgomp*.so*')))
print(candidates[0] if candidates else '')
"
"
"failed to probe
torch.libs
for libgomp"
)
"failed to probe for libgomp"
)
if
(
_VLLM_TORCH_GOMP_PATH STREQUAL
""
OR NOT EXISTS
"
${
_VLLM_TORCH_GOMP_PATH
}
"
)
if
(
_VLLM_TORCH_GOMP_PATH STREQUAL
""
OR NOT EXISTS
"
${
_VLLM_TORCH_GOMP_PATH
}
"
)
return
()
return
()
...
...
vllm/platforms/cpu.py
View file @
f355ad54
...
@@ -325,10 +325,16 @@ class CpuPlatform(Platform):
...
@@ -325,10 +325,16 @@ class CpuPlatform(Platform):
# We need to find the location of PyTorch's libgomp
# We need to find the location of PyTorch's libgomp
torch_pkg
=
os
.
path
.
dirname
(
torch
.
__file__
)
torch_pkg
=
os
.
path
.
dirname
(
torch
.
__file__
)
site_root
=
os
.
path
.
dirname
(
torch_pkg
)
site_root
=
os
.
path
.
dirname
(
torch_pkg
)
torch_libs
=
os
.
path
.
join
(
site_root
,
"torch.libs"
)
# Search both torch.libs and torch/lib - See: https://github.com/vllm-project/vllm/issues/30470
pytorch_libgomp_so_candidates
=
glob
.
glob
(
torch_libs_paths
=
[
os
.
path
.
join
(
torch_libs
,
"libgomp-*.so*"
)
os
.
path
.
join
(
site_root
,
"torch.libs"
),
)
os
.
path
.
join
(
torch_pkg
,
"lib"
),
]
pytorch_libgomp_so_candidates
=
[]
for
torch_libs
in
torch_libs_paths
:
pytorch_libgomp_so_candidates
.
extend
(
glob
.
glob
(
os
.
path
.
join
(
torch_libs
,
"libgomp*.so*"
))
)
if
pytorch_libgomp_so_candidates
:
if
pytorch_libgomp_so_candidates
:
pytorch_libgomp_so
=
pytorch_libgomp_so_candidates
[
0
]
pytorch_libgomp_so
=
pytorch_libgomp_so_candidates
[
0
]
if
ld_preload_str
:
if
ld_preload_str
:
...
...
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