mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-23 11:35:01 +08:00
[torch.compile] serialize cudagraph_mode as its enum name instead of value (#25868)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
This commit is contained in:
parent
4e2774f5c3
commit
9f78b9ca84
@ -73,6 +73,9 @@ class CUDAGraphMode(enum.Enum):
|
||||
CUDAGraphMode.NONE, CUDAGraphMode.PIECEWISE, CUDAGraphMode.FULL
|
||||
]
|
||||
|
||||
def __str__(self) -> str:
|
||||
return self.name
|
||||
|
||||
|
||||
@config
|
||||
@dataclass
|
||||
@ -417,10 +420,11 @@ class CompilationConfig:
|
||||
if pass_config_exclude:
|
||||
exclude["pass_config"] = pass_config_exclude
|
||||
|
||||
return TypeAdapter(CompilationConfig).dump_json(
|
||||
self,
|
||||
exclude=exclude, # type: ignore[arg-type]
|
||||
exclude_unset=True).decode()
|
||||
config = TypeAdapter(CompilationConfig).dump_python(self,
|
||||
exclude=exclude,
|
||||
exclude_unset=True)
|
||||
|
||||
return str(config)
|
||||
|
||||
__str__ = __repr__
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user