[Attention] MLA - Flashinfer Ragged Prefill (#20034)
This commit is contained in:
@@ -53,6 +53,12 @@ DEFAULT_LOGGING_CONFIG = {
|
||||
}
|
||||
|
||||
|
||||
@lru_cache
|
||||
def _print_debug_once(logger: Logger, msg: str, *args: Hashable) -> None:
|
||||
# Set the stacklevel to 2 to print the original caller's line info
|
||||
logger.debug(msg, *args, stacklevel=2)
|
||||
|
||||
|
||||
@lru_cache
|
||||
def _print_info_once(logger: Logger, msg: str, *args: Hashable) -> None:
|
||||
# Set the stacklevel to 2 to print the original caller's line info
|
||||
@@ -74,6 +80,13 @@ class _VllmLogger(Logger):
|
||||
`intel_extension_for_pytorch.utils._logger`.
|
||||
"""
|
||||
|
||||
def debug_once(self, msg: str, *args: Hashable) -> None:
|
||||
"""
|
||||
As [`debug`][logging.Logger.debug], but subsequent calls with
|
||||
the same message are silently dropped.
|
||||
"""
|
||||
_print_debug_once(self, msg, *args)
|
||||
|
||||
def info_once(self, msg: str, *args: Hashable) -> None:
|
||||
"""
|
||||
As [`info`][logging.Logger.info], but subsequent calls with
|
||||
@@ -132,6 +145,7 @@ def init_logger(name: str) -> _VllmLogger:
|
||||
logger = logging.getLogger(name)
|
||||
|
||||
methods_to_patch = {
|
||||
"debug_once": _print_debug_once,
|
||||
"info_once": _print_info_once,
|
||||
"warning_once": _print_warning_once,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user