[torch.compile] Allow usage of Opaque Objects in PyTorch 2.11 (#39286)
Signed-off-by: Richard Zou <zou3519@gmail.com>
This commit is contained in:
@@ -4857,6 +4857,9 @@ class GPUModelRunner(
|
||||
self.vllm_config.compilation_config.mode
|
||||
== CompilationMode.STOCK_TORCH_COMPILE
|
||||
):
|
||||
from vllm.env_override import _apply_constrain_to_fx_strides_patch
|
||||
|
||||
_apply_constrain_to_fx_strides_patch()
|
||||
backend = self.vllm_config.compilation_config.init_backend(self.vllm_config)
|
||||
compilation_counter.stock_torch_compile_count += 1
|
||||
self.model.compile(fullgraph=True, backend=backend)
|
||||
|
||||
Reference in New Issue
Block a user