Skip to content

Commit efaf0b2

Browse files
committed
address isotr0py's feedback
Signed-off-by: Tsai, Louie <[email protected]>
1 parent 108a407 commit efaf0b2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vllm/v1/worker/cpu_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22
import os
3+
from importlib import util
34
from typing import Optional
45

56
import torch
@@ -110,7 +111,6 @@ def get_cpus_id_binding_based_on_numa_nodes(self) -> str:
110111
rank_to_cpus = self.local_omp_cpuid
111112
# Setup OpenMP thread affinity based on NUMA nodes automatically
112113
world_size = self.vllm_config.parallel_config.world_size
113-
from importlib import util
114114
libnuma_found = util.find_spec("numa") is not None
115115
psutil_found = util.find_spec("psutil") is not None
116116
if libnuma_found and psutil_found:

vllm/worker/cpu_worker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
33
"""A CPU worker class."""
44
import os
5+
from importlib import util
56
from typing import Dict, List, Optional, Set, Tuple, Type
67

78
import torch
@@ -408,7 +409,6 @@ def get_cpus_id_binding_based_on_numa_nodes(self) -> str:
408409
rank_to_cpus = self.local_omp_cpuid
409410
# Setup OpenMP thread affinity based on NUMA nodes automatically
410411
world_size = self.vllm_config.parallel_config.world_size
411-
from importlib import util
412412
libnuma_found = util.find_spec("numa") is not None
413413
psutil_found = util.find_spec("psutil") is not None
414414
if libnuma_found and psutil_found:

0 commit comments

Comments
 (0)