Unverified Commit 80679f10 authored by Lukas Geiger's avatar Lukas Geiger Committed by GitHub
Browse files

[Core][MM] Use non-blocking CPU-GPU copy of multimodal data (#28141)


Signed-off-by: default avatarLukas Geiger <lukas.geiger94@gmail.com>
parent 43ecd0a9
......@@ -444,7 +444,9 @@ def group_mm_kwargs_by_modality(
if device is not None:
mm_kwargs_group = json_map_leaves(
lambda x: x.to(device=device) if isinstance(x, torch.Tensor) else x,
lambda x: x.to(device=device, non_blocking=True)
if isinstance(x, torch.Tensor)
else x,
mm_kwargs_group,
)
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment