[Misc] offest -> offset in comments and variable names (#33444)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
Russell Bryant
2026-01-30 23:19:22 -05:00
committed by GitHub
parent 0a3c71e7e5
commit a2ef06e1b3
2 changed files with 3 additions and 3 deletions

View File

@@ -105,7 +105,7 @@ class Mamba2AttentionMetadata(BaseMambaAttentionMetadata):
# Chunk-related metadata (only for prefill) # Chunk-related metadata (only for prefill)
seq_idx_p: torch.Tensor | None = None seq_idx_p: torch.Tensor | None = None
# cu_chunk_seqlen_p is a tensor of shape (nchunks+1,) that contains, for # cu_chunk_seqlen_p is a tensor of shape (nchunks+1,) that contains, for
# each chunk, its offests into the varlen sequence dimension. It is defined # each chunk, its offsets into the varlen sequence dimension. It is defined
# such that the i-th chunk contains tokens from cu_chunk_seqlen_p[i] to # such that the i-th chunk contains tokens from cu_chunk_seqlen_p[i] to
# cu_chunk_seqlen_p[i+1]. # cu_chunk_seqlen_p[i+1].
cu_chunk_seqlen_p: torch.Tensor | None = None cu_chunk_seqlen_p: torch.Tensor | None = None

View File

@@ -1038,7 +1038,7 @@ class SpecDecodeBaseProposer:
# [0, 1, 2, 3, 4, 5, 6, 7, 8] -> # [0, 1, 2, 3, 4, 5, 6, 7, 8] ->
# [0, 1, 0, 1, 2, 3, 0, 1, 2] # [0, 1, 0, 1, 2, 3, 0, 1, 2]
# _r1_ ____r2____ ___r3__ # _r1_ ____r2____ ___r3__
token_offests = ( token_offsets = (
self.token_arange_np[:total_num_tokens] - new_query_start_locs_expanded self.token_arange_np[:total_num_tokens] - new_query_start_locs_expanded
) )
@@ -1053,7 +1053,7 @@ class SpecDecodeBaseProposer:
# [0, 1, // req 1 # [0, 1, // req 1
# q1 + 0, q1 + 1, q1 + 2, q1 + 3, // req 2 # q1 + 0, q1 + 1, q1 + 2, q1 + 3, // req 2
# q1 + q2 + 0, q1 + q2 + 1, q1 + q2 + 2] // req 3 # q1 + q2 + 0, q1 + q2 + 1, q1 + q2 + 2] // req 3
token_indices_np = token_offests + old_query_start_locs_expanded token_indices_np = token_offsets + old_query_start_locs_expanded
token_indices = torch.from_numpy(token_indices_np).to(device, non_blocking=True) token_indices = torch.from_numpy(token_indices_np).to(device, non_blocking=True)
spec_common_attn_metadata = CommonAttentionMetadata( spec_common_attn_metadata = CommonAttentionMetadata(