Skip to content

Commit 4322723

Browse files
authored
[torch.compile] serialize cudagraph_mode as its enum name instead of value (vllm-project#25868)
Signed-off-by: zjy0516 <[email protected]>
1 parent 8616300 commit 4322723

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

vllm/config/compilation.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def valid_runtime_modes(self) -> bool:
7373
CUDAGraphMode.NONE, CUDAGraphMode.PIECEWISE, CUDAGraphMode.FULL
7474
]
7575

76+
def __str__(self) -> str:
77+
return self.name
78+
7679

7780
@config
7881
@dataclass
@@ -417,10 +420,11 @@ def __repr__(self) -> str:
417420
if pass_config_exclude:
418421
exclude["pass_config"] = pass_config_exclude
419422

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)
424428

425429
__str__ = __repr__
426430

0 commit comments

Comments
 (0)