Skip to content
Open
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
1 change: 1 addition & 0 deletions csrc/register.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ PYBIND11_MODULE(vortex_torch_C, m){
m.def("Chunkwise_NH2HN_Transpose", &Chunkwise_NH2HN_Transpose);
m.def("Chunkwise_HN2NH_Transpose", &Chunkwise_HN2NH_Transpose);
m.def("topk_output", &topk_output);
m.def("topk_output_sglang", &topk_output_sglang);
m.def("sglang_plan_decode_fa3", &sglang_plan_decode_fa3);
m.def("sglang_plan_prefill_fa3", &sglang_plan_prefill_fa3);
m.def("Chunkwise_HN2NH_Transpose_FA3", &Chunkwise_HN2NH_Transpose_FA3);
Expand Down
12 changes: 12 additions & 0 deletions csrc/register.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,18 @@ const int64_t reserved_eos,
const int64_t max_seq_lengths
);

void topk_output_sglang(
const at::Tensor& x,
const at::Tensor& dense_kv_indptr,
const at::Tensor& sparse_kv_indptr,
const at::Tensor& dense_kv_indices,
at::Tensor& sparse_kv_indices,
const int64_t eff_batch_size,
const int64_t topk_val,
const int64_t reserved_bos,
const int64_t reserved_eos,
const int64_t max_seq_lengths
);

void sglang_plan_decode_fa3(
const at::Tensor& cached_seq_lens,
Expand Down
2 changes: 1 addition & 1 deletion csrc/topk.cu
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ const int64_t max_num_pages
TORCH_CHECK(false);
}

}
}
Loading