mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-29 05:47:05 +08:00
[bugfix] Pass globals to aot_compiled function (#29428)
Signed-off-by: angelayi <yiangela7@gmail.com>
This commit is contained in:
parent
da7bc54ea8
commit
e7296b08da
@ -409,7 +409,9 @@ def _support_torch_compile(
|
|||||||
open(aot_compilation_path, "rb") as f,
|
open(aot_compilation_path, "rb") as f,
|
||||||
):
|
):
|
||||||
start_monitoring_torch_compile(self.vllm_config)
|
start_monitoring_torch_compile(self.vllm_config)
|
||||||
loaded_fn = torch.compiler.load_compiled_function(f)
|
loaded_fn = torch.compiler.load_compiled_function(
|
||||||
|
f, f_globals=self.forward.__globals__
|
||||||
|
)
|
||||||
_verify_source_unchanged(loaded_fn.source_info(), self.vllm_config)
|
_verify_source_unchanged(loaded_fn.source_info(), self.vllm_config)
|
||||||
loaded_fn.disable_guard_check()
|
loaded_fn.disable_guard_check()
|
||||||
self.aot_compiled_fn = loaded_fn
|
self.aot_compiled_fn = loaded_fn
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user