[misc] add torch.compile compatibility check (#10618)
Signed-off-by: youkaichao <youkaichao@gmail.com>
This commit is contained in:
@@ -2394,6 +2394,20 @@ class VllmConfig:
|
||||
self.compilation_config.pass_config.enable_reshape = False
|
||||
self.compilation_config.level = CompilationLevel.PIECEWISE
|
||||
|
||||
if self.cache_config is not None and \
|
||||
self.cache_config.cpu_offload_gb > 0 and \
|
||||
self.compilation_config.level != CompilationLevel.NO_COMPILATION:
|
||||
logger.warning(
|
||||
"CPU offload is not supported with `torch.compile` yet."
|
||||
" Disabling `torch.compile`.")
|
||||
self.compilation_config.level = CompilationLevel.NO_COMPILATION
|
||||
|
||||
if self.lora_config is not None and self.compilation_config.level !=\
|
||||
CompilationLevel.NO_COMPILATION:
|
||||
logger.warning("LoRA is not supported with `torch.compile` yet. "
|
||||
"Disabling `torch.compile`.")
|
||||
self.compilation_config.level = CompilationLevel.NO_COMPILATION
|
||||
|
||||
current_platform.check_and_update_config(self)
|
||||
|
||||
def __str__(self):
|
||||
|
||||
Reference in New Issue
Block a user