A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[torch.compile] serialize cudagraph_mode as its enum name instead of value (#25868)
Signed-off-by: zjy0516 <riverclouds.zhu@qq.com>
Jiangyun Zhu committed
Sep 29, 2025 at 21:54 UTC
43227236ecaa0ea741504a3b403a57846d307129
1 file changed
+8
-4
vllm/config/compilation.py
+8
-4
@@ -73,6 +73,9 @@ class CUDAGraphMode(enum.Enum):
73
CUDAGraphMode.NONE, CUDAGraphMode.PIECEWISE, CUDAGraphMode.FULL
74
]
75
76
+ def __str__(self) -> str:
77
+ return self.name
78
+
79
80
@config
81
@dataclass
@@ -417,10 +420,11 @@ class CompilationConfig:
420
if pass_config_exclude:
421
exclude["pass_config"] = pass_config_exclude
422
420
- return TypeAdapter(CompilationConfig).dump_json(
421
- self,
422
- exclude=exclude, # type: ignore[arg-type]
423
- exclude_unset=True).decode()
423
+ config = TypeAdapter(CompilationConfig).dump_python(self,
424
+ exclude=exclude,
425
+ exclude_unset=True)
426
+
427
+ return str(config)
428
429
__str__ = __repr__
430