mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-10-28 21:51:46 +08:00
10 lines
378 B
C
10 lines
378 B
C
#pragma once
|
|
|
|
#include <torch/extension.h>
|
|
#include <torch/library.h>
|
|
#include <torch/torch.h>
|
|
|
|
void topk_softmax(torch::Tensor& topk_weights, // [num_tokens, topk]
|
|
torch::Tensor& topk_indices, // [num_tokens, topk]
|
|
torch::Tensor& token_expert_indices, // [num_tokens, topk]
|
|
torch::Tensor& gating_output); |