Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lmdeploy/pytorch/backends/dlinfer/ascend/op_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ def get_cpu_seqlens(is_decoding, is_unpaged_prefill):
repeat_interleave, used for attention metadata.
"""
if is_decoding:
q_seqlens_cpu = None
q_seqlens_cpu = None if AscendOpsBackend.enable_graph else torch.arange(1, step_context.kv_seqlens.size(0) + 1,
dtype=torch.int32)
kv_seqlens_cpu = kv_seqlens_expanded = step_context.kv_seqlens.cpu()
elif is_unpaged_prefill:
q_seqlens_cpu = step_context.q_seqlens.cpu()
Expand Down
3 changes: 3 additions & 0 deletions lmdeploy/pytorch/kernels/dlinfer/pagedattention.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def paged_token_attention(
k_cache,
v_cache,
attn_output,
q_seqlens,
kv_seq_len,
max_kv_seq_len,
block_offsets,
Expand All @@ -96,6 +97,7 @@ def paged_token_attention(
v_cache,
block_offsets,
block_size,
q_seqlens,
kv_seq_len,
max_kv_seq_len,
num_q_heads,
Expand Down Expand Up @@ -167,6 +169,7 @@ def paged_attention_fwd(
key_cache,
value_cache,
attn_output,
q_seqlens,
kv_seqlens,
max_kv_seq_len,
block_offsets,
Expand Down
6 changes: 3 additions & 3 deletions requirements/runtime_ascend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ safetensors
sentencepiece
shortuuid
tiktoken
torch>=2.3.1,<2.9.0
torch-npu>=2.3.1,<2.9.0
torchvision>=0.18.1,<0.24.0
torch>=2.3.1,<2.10.0
torch-npu>=2.3.1,<2.10.0
torchvision>=0.18.1,<0.25.0
transformers
uvicorn
xgrammar
Loading