Skip to content

Commit 2d5611c

Browse files
authored
Update for ci (#312)
* Update awq.py * Update module_utils.py * Update module_utils.py * Update base_blockwise_quantization.py * Update awq.py * Update base_blockwise_quantization.py
1 parent d9cd424 commit 2d5611c

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

llmc/compression/quantization/awq.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
from llmc.utils.registry_factory import ALGO_REGISTRY
1010

1111
from .base_blockwise_quantization import BaseBlockwiseQuantization
12-
from .fp8_kernel import weight_dequant, weight_quant
12+
13+
try:
14+
from .fp8_kernel import weight_dequant, weight_quant
15+
except Exception:
16+
logger.warning(
17+
'import triton error. '
18+
)
19+
1320
from .module_utils import (_LLMC_LINEAR_TYPES_, _LLMC_LN_TYPES_,
1421
_TRANSFORMERS_LINEAR_TYPES_,
1522
_TRANSFORMERS_LN_TYPES_, FakeQuantLinear)

llmc/compression/quantization/base_blockwise_quantization.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
from ..blockwise_optimization import BlockwiseOpt
1818
from .attn_utils import _LLMC_ATTN_MAP_
1919
from .auto_clip import AutoClipper
20-
from .fp8_kernel import weight_dequant, weight_quant
20+
21+
try:
22+
from .fp8_kernel import weight_dequant, weight_quant
23+
except Exception:
24+
logger.warning(
25+
'import triton error. '
26+
)
27+
2128
from .hadamard_utils import apply_exact_had_to_linear, get_hadK
2229
from .module_utils import (_LLMC_LINEAR_TYPES_, _LLMC_LN_TYPES_,
2330
_REALQUANT_LINEAR_MAP_, _TRANSFORMERS_LINEAR_TYPES_,

llmc/compression/quantization/module_utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@
88
from loguru import logger
99
from transformers.pytorch_utils import ALL_LAYERNORM_LAYERS
1010

11-
from .fp8_kernel import act_quant, fp8_gemm, weight_dequant, weight_quant
11+
try:
12+
from .fp8_kernel import act_quant, fp8_gemm, weight_dequant, weight_quant
13+
except Exception:
14+
logger.warning(
15+
'import triton error. '
16+
)
1217

1318
try:
1419
import fast_hadamard_transform

0 commit comments

Comments
 (0)