Skip to content
Closed
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
8 changes: 8 additions & 0 deletions server/marlin/marlin_kernels/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import torch

def awq_marlin_repack(
b_q_weight: torch.Tensor, size_k: int, size_n: int, num_bits: int
) -> torch.Tensor:
"""Repack AWQ parameters for GPTQ-Marlin."""
...

def gptq_marlin_gemm(
a: torch.Tensor,
b_q_weight: torch.Tensor,
Expand All @@ -12,6 +18,8 @@ def gptq_marlin_gemm(
size_n: int,
size_k: int,
is_k_full: bool,
has_zp: bool,
use_fp32_reduce: bool,
) -> torch.Tensor:
"""
Matrix multiplication using Marlin kernels. This is an extension of
Expand Down
3 changes: 2 additions & 1 deletion server/marlin/marlin_kernels/ext.hh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ torch::Tensor gptq_marlin_gemm(torch::Tensor &a, torch::Tensor &b_q_weight,
torch::Tensor &g_idx, torch::Tensor &perm,
torch::Tensor &workspace, int64_t num_bits,
int64_t size_m, int64_t size_n, int64_t size_k,
bool is_k_full, bool has_zp);
bool is_k_full, bool has_zp,
bool use_fp32_reduce);

torch::Tensor gptq_marlin_24_gemm(torch::Tensor &a, torch::Tensor &b_q_weight,
torch::Tensor &b_meta,
Expand Down
Loading