Skip to content

Commit

Permalink
[torch.compile] fix shape specialization (vllm-project#10722)
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao authored Nov 27, 2024
1 parent 308cc5e commit c411def
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions vllm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2151,7 +2151,7 @@ class CompilationConfig(BaseModel):

use_inductor: bool = True
inductor_specialize_for_cudagraph_no_more_than: Optional[int] = None
inductor_compile_sizes: Optional[List[int]] = Field(default_factory=dict)
inductor_compile_sizes: Optional[List[int]] = Field(default=None)
inductor_compile_config: Dict = Field(default_factory=dict)
inductor_passes: Dict[str, str] = Field(default_factory=dict)

Expand Down Expand Up @@ -2290,9 +2290,8 @@ def init_during_runtime(self):
if x <= self.inductor_specialize_for_cudagraph_no_more_than
]
else:
assert self.inductor_compile_sizes is not None, (
"inductor_compile_sizes should not be None when "
"inductor_specialize_for_cudagraph_no_more_than is None")
if self.inductor_compile_sizes is None:
self.inductor_compile_sizes = []
self.compile_sizes = self.inductor_compile_sizes


Expand Down

0 comments on commit c411def

Please sign in to comment.