[feature] vllm-ascend support msprobe (eager mode dump) (#4241)
### What this PR does / why we need it?
vllm-ascend need to dump data during model execution to debug some
precision problems, here msprobe provide the corresponding abilities, so
msprobe will join vllm-ascend to make debug easier
### Does this PR introduce _any_ user-facing change?
```
'dump_config': '/path/to/config.json'
```
- vLLM version: v0.11.0
- vLLM main:
2918c1b49c
---------
Signed-off-by: Tjh-UKN <2559659915@qq.com>
This commit is contained in:
@@ -44,6 +44,10 @@ class AscendConfig:
|
||||
self.ascend_scheduler_config = AscendSchedulerConfig(
|
||||
ascend_scheduler_config)
|
||||
|
||||
# Dump / PrecisionDebugger configuration
|
||||
dump_config_path = additional_config.get("dump_config", None)
|
||||
self.dump_config = DumpConfig(dump_config_path)
|
||||
|
||||
weight_prefetch_config = additional_config.get(
|
||||
"weight_prefetch_config", {})
|
||||
self.weight_prefetch_config = WeightPrefetchConfig(
|
||||
@@ -230,6 +234,18 @@ class AscendSchedulerConfig:
|
||||
setattr(self, k, v)
|
||||
|
||||
|
||||
class DumpConfig:
|
||||
"""
|
||||
Configuration object for dump/PrecisionDebugger settings.
|
||||
"""
|
||||
|
||||
def __init__(self, dump_config_path: Optional[str] = None):
|
||||
# enable_dump is True when dump_cfg exists and config_path is not empty
|
||||
self.enable_dump: bool = bool(dump_config_path)
|
||||
# Path to msprobe config json; may be None.
|
||||
self.config_path: Optional[str] = dump_config_path
|
||||
|
||||
|
||||
class WeightPrefetchConfig:
|
||||
"""
|
||||
Configuration Object for weight_prefetch_config from additional_config
|
||||
|
||||
Reference in New Issue
Block a user