[Misc] improve warning/assert messages (#32226)
Signed-off-by: cjackal <44624812+cjackal@users.noreply.github.com>
This commit is contained in:
@@ -546,7 +546,7 @@ class InductorAdaptor(CompilerInterface):
|
|||||||
hash_str, example_inputs, True, False
|
hash_str, example_inputs, True, False
|
||||||
)
|
)
|
||||||
assert inductor_compiled_graph is not None, (
|
assert inductor_compiled_graph is not None, (
|
||||||
"Inductor cache lookup failed. Please remove"
|
"Inductor cache lookup failed. Please remove "
|
||||||
f"the cache directory and try again." # noqa
|
f"the cache directory and try again." # noqa
|
||||||
)
|
)
|
||||||
elif torch.__version__ >= "2.6":
|
elif torch.__version__ >= "2.6":
|
||||||
@@ -557,7 +557,7 @@ class InductorAdaptor(CompilerInterface):
|
|||||||
hash_str, example_inputs, True, None, constants
|
hash_str, example_inputs, True, None, constants
|
||||||
)
|
)
|
||||||
assert inductor_compiled_graph is not None, (
|
assert inductor_compiled_graph is not None, (
|
||||||
"Inductor cache lookup failed. Please remove"
|
"Inductor cache lookup failed. Please remove "
|
||||||
f"the cache directory and try again." # noqa
|
f"the cache directory and try again." # noqa
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -949,8 +949,8 @@ class CompilationConfig:
|
|||||||
)
|
)
|
||||||
if self.cudagraph_mode == CUDAGraphMode.PIECEWISE:
|
if self.cudagraph_mode == CUDAGraphMode.PIECEWISE:
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Piecewise compilation with empty splitting_ops do not"
|
"Piecewise compilation with empty splitting_ops does not "
|
||||||
"contains piecewise cudagraph. Setting cudagraph_"
|
"contain piecewise cudagraph. Setting cudagraph_"
|
||||||
"mode to NONE. Hint: If you are using attention "
|
"mode to NONE. Hint: If you are using attention "
|
||||||
"backends that support cudagraph, consider manually "
|
"backends that support cudagraph, consider manually "
|
||||||
"setting cudagraph_mode to FULL or FULL_DECODE_ONLY "
|
"setting cudagraph_mode to FULL or FULL_DECODE_ONLY "
|
||||||
@@ -959,8 +959,8 @@ class CompilationConfig:
|
|||||||
self.cudagraph_mode = CUDAGraphMode.NONE
|
self.cudagraph_mode = CUDAGraphMode.NONE
|
||||||
elif self.cudagraph_mode == CUDAGraphMode.FULL_AND_PIECEWISE:
|
elif self.cudagraph_mode == CUDAGraphMode.FULL_AND_PIECEWISE:
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Piecewise compilation with empty splitting_ops do "
|
"Piecewise compilation with empty splitting_ops does "
|
||||||
"not contains piecewise cudagraph. Setting "
|
"not contain piecewise cudagraph. Setting "
|
||||||
"cudagraph_mode to FULL."
|
"cudagraph_mode to FULL."
|
||||||
)
|
)
|
||||||
self.cudagraph_mode = CUDAGraphMode.FULL
|
self.cudagraph_mode = CUDAGraphMode.FULL
|
||||||
|
|||||||
@@ -1494,7 +1494,7 @@ class ModelConfig:
|
|||||||
|
|
||||||
if self.runner_type != "pooling" and head_dtype != self.dtype:
|
if self.runner_type != "pooling" and head_dtype != self.dtype:
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"`head_dtype` currently only supports pooling models."
|
"`head_dtype` currently only supports pooling models, "
|
||||||
"fallback to model dtype [%s].",
|
"fallback to model dtype [%s].",
|
||||||
self.dtype,
|
self.dtype,
|
||||||
)
|
)
|
||||||
|
|||||||
+10
-10
@@ -672,9 +672,9 @@ class VllmConfig:
|
|||||||
and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
|
and self.compilation_config.mode != CompilationMode.VLLM_COMPILE
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Inductor compilation was disabled by user settings,"
|
"Inductor compilation was disabled by user settings, "
|
||||||
"Optimizations settings that are only active during"
|
"optimizations settings that are only active during "
|
||||||
"Inductor compilation will be ignored."
|
"inductor compilation will be ignored."
|
||||||
)
|
)
|
||||||
|
|
||||||
def has_blocked_weights():
|
def has_blocked_weights():
|
||||||
@@ -790,7 +790,7 @@ class VllmConfig:
|
|||||||
|
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"--kv-sharing-fast-prefill requires changes on model side for "
|
"--kv-sharing-fast-prefill requires changes on model side for "
|
||||||
"correctness and to realize prefill savings. "
|
"correctness and to realize prefill savings."
|
||||||
)
|
)
|
||||||
# TODO: Move after https://github.com/vllm-project/vllm/pull/26847 lands
|
# TODO: Move after https://github.com/vllm-project/vllm/pull/26847 lands
|
||||||
self._set_compile_ranges()
|
self._set_compile_ranges()
|
||||||
@@ -813,7 +813,7 @@ class VllmConfig:
|
|||||||
and not self.cache_config.enable_prefix_caching
|
and not self.cache_config.enable_prefix_caching
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"KV cache events are on, but prefix caching is not enabled."
|
"KV cache events are on, but prefix caching is not enabled. "
|
||||||
"Use --enable-prefix-caching to enable."
|
"Use --enable-prefix-caching to enable."
|
||||||
)
|
)
|
||||||
if (
|
if (
|
||||||
@@ -822,9 +822,9 @@ class VllmConfig:
|
|||||||
and not self.kv_events_config.enable_kv_cache_events
|
and not self.kv_events_config.enable_kv_cache_events
|
||||||
):
|
):
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"KV cache events are disabled,"
|
"KV cache events are disabled, "
|
||||||
"but the scheduler is configured to publish them."
|
"but the scheduler is configured to publish them. "
|
||||||
"Modify KVEventsConfig.enable_kv_cache_events"
|
"Modify KVEventsConfig.enable_kv_cache_events "
|
||||||
"to True to enable."
|
"to True to enable."
|
||||||
)
|
)
|
||||||
current_platform.check_and_update_config(self)
|
current_platform.check_and_update_config(self)
|
||||||
@@ -893,7 +893,7 @@ class VllmConfig:
|
|||||||
else "pipeline parallelism"
|
else "pipeline parallelism"
|
||||||
)
|
)
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Sequence parallelism not supported with"
|
"Sequence parallelism not supported with "
|
||||||
"native rms_norm when using %s, "
|
"native rms_norm when using %s, "
|
||||||
"this will likely lead to an error.",
|
"this will likely lead to an error.",
|
||||||
regime,
|
regime,
|
||||||
@@ -910,7 +910,7 @@ class VllmConfig:
|
|||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"No piecewise cudagraph for executing cascade attention."
|
"No piecewise cudagraph for executing cascade attention."
|
||||||
" Will fall back to eager execution if a batch runs "
|
" Will fall back to eager execution if a batch runs "
|
||||||
"into cascade attentions"
|
"into cascade attentions."
|
||||||
)
|
)
|
||||||
|
|
||||||
if self.compilation_config.cudagraph_mode.requires_piecewise_compilation():
|
if self.compilation_config.cudagraph_mode.requires_piecewise_compilation():
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ def load_lora_op_config(op_type: str, add_inputs: bool | None) -> dict | None:
|
|||||||
|
|
||||||
config_path = Path(f"{user_defined_config_folder}/{config_fname}")
|
config_path = Path(f"{user_defined_config_folder}/{config_fname}")
|
||||||
if not config_path.exists():
|
if not config_path.exists():
|
||||||
logger.warning_once(f"No LoRA kernel configs founded in {config_path}")
|
logger.warning_once(f"No LoRA kernel configs found in {config_path}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Load json
|
# Load json
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ def get_flash_attn_version(requires_alibi: bool = False) -> int | None:
|
|||||||
# 3. fallback for unsupported combinations
|
# 3. fallback for unsupported combinations
|
||||||
if device_capability.major == 10 and fa_version == 3:
|
if device_capability.major == 10 and fa_version == 3:
|
||||||
logger.warning_once(
|
logger.warning_once(
|
||||||
"Cannot use FA version 3 on Blackwell platform "
|
"Cannot use FA version 3 on Blackwell platform, "
|
||||||
"defaulting to FA version 2."
|
"defaulting to FA version 2."
|
||||||
)
|
)
|
||||||
fa_version = 2
|
fa_version = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user