mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 07:05:02 +08:00
[torch.compile] fix shape specialization (#10722)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
parent
308cc5e21e
commit
c411def234
@ -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)
|
||||
|
||||
@ -2290,9 +2290,8 @@ class CompilationConfig(BaseModel):
|
||||
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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user