[Perf] Avoid h2d copies from non-pinned CPU tensors (#54299)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-08-29 12:06:30 +08:00
committed by GitHub
parent 5182f2705b
commit 6c18a54648
14 changed files with 81 additions and 84 deletions
+4 -1
View File
@@ -215,7 +215,10 @@ class EncoderRunner:
num_computed_tokens = num_computed_tokens + draft_lookahead
is_mm_embed = torch.zeros(
total_num_scheduled_tokens, dtype=torch.bool, device="cpu"
total_num_scheduled_tokens,
dtype=torch.bool,
device="cpu",
pin_memory=PIN_MEMORY,
)
# Whether to gather media embeddings this step.