[Fix] Make the DSpark draft num_token_non_padded host-to-device copy non-blocking (#34782)
This commit is contained in:
@@ -355,8 +355,8 @@ class DraftBlockProposer:
|
|||||||
spec_algorithm=SpeculativeAlgorithm.DSPARK,
|
spec_algorithm=SpeculativeAlgorithm.DSPARK,
|
||||||
spec_info=self._draft_block_spec_info,
|
spec_info=self._draft_block_spec_info,
|
||||||
capture_hidden_mode=CaptureHiddenMode.NULL,
|
capture_hidden_mode=CaptureHiddenMode.NULL,
|
||||||
num_token_non_padded=torch.tensor(
|
num_token_non_padded=torch.tensor(draft_num_tokens, dtype=torch.int32).to(
|
||||||
draft_num_tokens, dtype=torch.int32, device=device
|
device, non_blocking=True
|
||||||
),
|
),
|
||||||
num_token_non_padded_cpu=draft_num_tokens,
|
num_token_non_padded_cpu=draft_num_tokens,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user