marlin_moe_ops.h 531 B

123456789101112
  1. #pragma once
  2. #include <torch/all.h>
  3. torch::Tensor marlin_gemm_moe(
  4. const torch::Tensor& a, const torch::Tensor& b_q_weights,
  5. const torch::Tensor& sorted_ids, const torch::Tensor& topk_weights,
  6. const torch::Tensor& topk_ids, const torch::Tensor& b_scales,
  7. const torch::Tensor& g_idx, const torch::Tensor& perm,
  8. torch::Tensor& workspace, int64_t size_m, int64_t size_n, int64_t size_k,
  9. bool is_k_full, int64_t num_experts, int64_t topk, int64_t moe_block_size,
  10. bool replicate_input, bool apply_weights);