[DeepSeek V3.2] [Bugfix] slice indexer and padding fa3 when can not run cuda graph (#17076)

This commit is contained in:
Yongfei Xu
2026-02-03 01:32:20 +08:00
committed by GitHub
parent 980d2936cd
commit 677f3c49da
4 changed files with 58 additions and 7 deletions
+7 -1
View File
@@ -1,5 +1,5 @@
import unittest
from typing import Optional, Tuple
from typing import List, Optional, Tuple
from unittest.mock import MagicMock, patch
import torch
@@ -132,6 +132,12 @@ class MockIndexerMetadata(BaseIndexerMetadata):
"""Return: seq lens for each batch."""
return torch.tensor(self.seq_lens, dtype=torch.int32, device="cpu")
def get_nsa_extend_len_cpu(self) -> List[int]:
"""
Return: extend seq lens for each batch.
"""
return list(self.seq_lens)
def get_token_to_batch_idx(self) -> torch.Tensor:
"""Return: batch idx for each token."""
result = []