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
4ab34f6e
Unverified
Commit
4ab34f6e
authored
Nov 13, 2025
by
usberkeley
Committed by
GitHub
Nov 13, 2025
Browse files
Add NUMA node validation for CPU thread binding (#28555)
Signed-off-by:
Bradley
<
bradley.b.pitt@gmail.com
>
parent
c33b87e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
csrc/cpu/utils.cpp
csrc/cpu/utils.cpp
+10
-0
No files found.
csrc/cpu/utils.cpp
View file @
4ab34f6e
...
...
@@ -45,6 +45,16 @@ std::string init_cpu_threads_env(const std::string& cpu_ids) {
// Memory node binding
if
(
numa_available
()
!=
-
1
)
{
int
mem_node_id
=
numa_node_of_cpu
(
omp_cpu_ids
.
front
());
// Verify all CPUs are on the same NUMA node
for
(
size_t
i
=
1
;
i
<
omp_cpu_ids
.
size
();
++
i
)
{
int
node_id
=
numa_node_of_cpu
(
omp_cpu_ids
[
i
]);
TORCH_CHECK
(
node_id
==
mem_node_id
,
"CPU "
,
omp_cpu_ids
[
i
],
" is on NUMA node "
,
node_id
,
", but CPU "
,
omp_cpu_ids
.
front
(),
" is on NUMA node "
,
mem_node_id
,
". All CPUs should be on the same NUMA node for optimal "
"performance. Memory will be bound to NUMA node "
,
mem_node_id
,
"."
);
}
bitmask
*
mask
=
numa_parse_nodestring
(
std
::
to_string
(
mem_node_id
).
c_str
());
bitmask
*
src_mask
=
numa_get_membind
();
...
...
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