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
8 changes: 8 additions & 0 deletions aphrodite/_custom_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,10 @@ def awq_dequantize(qweight: torch.Tensor, scales: torch.Tensor,
from aphrodite.quantization.awq_triton import (
awq_dequantize_triton)
return awq_dequantize_triton(qweight, scales, zeros)
if envs.APHRODITE_USE_GLUON_AWQ:
from aphrodite.quantization.awq_gluon import (
awq_dequantize_gluon)
return awq_dequantize_gluon(qweight, scales, zeros)
return torch.ops._C.awq_dequantize(qweight, scales, zeros, split_k_iters,
thx, thy)

Expand All @@ -388,6 +392,10 @@ def awq_gemm(input: torch.Tensor, qweight: torch.Tensor, qzeros: torch.Tensor,
from aphrodite.quantization.awq_triton import (
awq_gemm_triton)
return awq_gemm_triton(input, qweight, qzeros, scales, split_k_iters)
if envs.APHRODITE_USE_GLUON_AWQ:
from aphrodite.quantization.awq_gluon import (
awq_gemm_gluon)
return awq_gemm_gluon(input, qweight, scales, qzeros)
return torch.ops._C.awq_gemm(input, qweight, qzeros, scales, split_k_iters)


Expand Down
5 changes: 5 additions & 0 deletions aphrodite/common/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
APHRODITE_TORCH_PROFILER_WITH_STACK: bool = True
APHRODITE_TORCH_PROFILER_WITH_FLOPS: bool = False
APHRODITE_USE_TRITON_AWQ: bool = False
APHRODITE_USE_GLUON_AWQ: bool = False
APHRODITE_ALLOW_RUNTIME_LORA_UPDATING: bool = False
APHRODITE_SKIP_P2P_CHECK: bool = False
APHRODITE_DISABLED_KERNELS: list[str] = []
Expand Down Expand Up @@ -702,6 +703,10 @@ def get_aphrodite_port() -> Optional[int]:
"APHRODITE_USE_TRITON_AWQ":
lambda: bool(int(os.getenv("APHRODITE_USE_TRITON_AWQ", "0"))),

# If set, Aphrodite will use Gluon implementations of AWQ.
"APHRODITE_USE_GLUON_AWQ":
lambda: bool(int(os.getenv("APHRODITE_USE_GLUON_AWQ", "0"))),

# If set, allow loading or unloading lora adapters in runtime,
"APHRODITE_ALLOW_RUNTIME_LORA_UPDATING":
lambda:
Expand Down
Loading
Loading