[Misc] Move print_*_once from utils to logger (#11298)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
Co-authored-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
This commit is contained in:
Cyrus Leung
2025-01-09 12:48:12 +08:00
committed by GitHub
co-authored by Maxime Fournioux
parent 730e9592e9
commit d848800e88
21 changed files with 129 additions and 72 deletions
@@ -3,11 +3,13 @@ from typing import Optional
import torch
import vllm._custom_ops as ops
from vllm.logger import init_logger
from vllm.platforms import current_platform
from vllm.utils import print_warning_once
from .marlin_utils import marlin_make_workspace, marlin_permute_scales
logger = init_logger(__name__)
def is_fp8_marlin_supported():
return current_platform.has_device_capability(80)
@@ -47,7 +49,7 @@ def apply_fp8_marlin_linear(
def prepare_fp8_layer_for_marlin(layer: torch.nn.Module,
strategy: str = "tensor") -> None:
print_warning_once(
logger.warning_once(
"Your GPU does not have native support for FP8 computation but "
"FP8 quantization is being used. Weight-only FP8 compression will "
"be used leveraging the Marlin kernel. This may degrade "