[Core] Ensure memory is pinned prior to async h2d copy (#45424)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
+2
-1
@@ -31,6 +31,7 @@ from vllm.logger import init_logger
|
||||
from vllm.usage.usage_lib import UsageContext, is_usage_stats_enabled, usage_message
|
||||
from vllm.utils.network_utils import get_open_zmq_ipc_path, get_tcp_uri
|
||||
from vllm.utils.system_utils import decorate_logs, kill_process_tree, set_process_title
|
||||
from vllm.utils.torch_utils import PIN_MEMORY
|
||||
from vllm.v1.core.sched.output import SchedulerOutput
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -114,7 +115,7 @@ class CpuGpuBuffer:
|
||||
*size: int | torch.SymInt,
|
||||
dtype: torch.dtype,
|
||||
device: torch.device,
|
||||
pin_memory: bool,
|
||||
pin_memory: bool = PIN_MEMORY,
|
||||
with_numpy: bool = True,
|
||||
) -> None:
|
||||
# these buffers are mutable runtime state, so allocate them as normal
|
||||
|
||||
Reference in New Issue
Block a user