Skip to content
Open
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
6 changes: 5 additions & 1 deletion atom/model_ops/moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
per_tensor_dequantize,
shuffle_weights,
)
from atom.utils import envs
from atom.utils.custom_register import direct_register_custom_op
from atom.utils.forward_context import get_forward_context
from torch import nn
Expand Down Expand Up @@ -634,7 +635,10 @@ def __init__(self, quant_config: QuantizationConfig, moe: FusedMoEConfig):
self.quant_type == QuantType.per_1x128
or self.quant_type == QuantType.per_1x32
)
self.use_triton = get_gfx().startswith("gfx94")
gfx = get_gfx()
self.use_triton = gfx.startswith("gfx94") or (
gfx.startswith("gfx95") and envs.ATOM_USE_TRITON_GEMM
)
if self.use_triton:
from atom.model_ops.utils import has_triton_kernels

Expand Down