提交vllm0.11.0开发分支
This commit is contained in:
@@ -98,12 +98,10 @@ cached_backends: Dict[int, CompilerFn] = {}
|
||||
unset = Unset.token
|
||||
|
||||
from torch._C._dynamo.eval_frame import set_eval_frame
|
||||
|
||||
|
||||
def _maybe_set_eval_frame(callback: DynamoCallback):
|
||||
# A wrapper on set_eval_frame that is guarded by a Justknob.
|
||||
# Users can disable torchDynamo by setting the JK to False.
|
||||
# from torch._C._dynamo.eval_frame import set_eval_frame
|
||||
#from torch._C._dynamo.eval_frame import set_eval_frame
|
||||
|
||||
if not justknobs_check("pytorch/compiler:enable_compiler_set_eval_frame"):
|
||||
torch._dynamo.utils.warn_once(
|
||||
@@ -130,7 +128,7 @@ DONT_WRAP_FILES = {
|
||||
|
||||
|
||||
def _debug_get_cache_entry_list(
|
||||
code: Union[types.CodeType, Callable[..., Any]],
|
||||
code: Union[types.CodeType, Callable[..., Any]]
|
||||
) -> List[CacheEntry]:
|
||||
"""
|
||||
Given a code object or a callable object, retrieve the cache entries
|
||||
@@ -373,9 +371,9 @@ class _TorchDynamoContext:
|
||||
# add context containing GraphModule to any GraphModule forward functions
|
||||
if isinstance(fn, GraphModule):
|
||||
# add context containing GraphModule to any GraphModule forward functions
|
||||
code_context.get_context(fn.forward.__code__)["orig_graphmodule"] = (
|
||||
weakref.ref(fn)
|
||||
)
|
||||
code_context.get_context(fn.forward.__code__)[
|
||||
"orig_graphmodule"
|
||||
] = weakref.ref(fn)
|
||||
|
||||
# Optimize the forward method of torch.nn.Module object
|
||||
if isinstance(fn, torch.nn.Module):
|
||||
@@ -789,11 +787,9 @@ def _optimize(
|
||||
hooks,
|
||||
backend_ctx_ctor,
|
||||
dynamic=dynamic,
|
||||
compiler_config=(
|
||||
backend.get_compiler_config()
|
||||
if hasattr(backend, "get_compiler_config")
|
||||
else None
|
||||
),
|
||||
compiler_config=backend.get_compiler_config()
|
||||
if hasattr(backend, "get_compiler_config")
|
||||
else None,
|
||||
rebuild_ctx=rebuild_ctx,
|
||||
)
|
||||
|
||||
@@ -907,11 +903,9 @@ class FlattenInputOutputSignature(torch.fx.interpreter.Transformer):
|
||||
flat_args[i],
|
||||
symbolic_context=StatelessSymbolicContext(
|
||||
dynamic_sizes=[
|
||||
(
|
||||
DimDynamic.DYNAMIC
|
||||
if d in flat_args_dynamic_dims[i]
|
||||
else DimDynamic.STATIC
|
||||
)
|
||||
DimDynamic.DYNAMIC
|
||||
if d in flat_args_dynamic_dims[i]
|
||||
else DimDynamic.STATIC
|
||||
for d in range(len(flat_args[i].shape))
|
||||
],
|
||||
constraint_sizes=[None] * len(flat_args[i].shape),
|
||||
|
||||
Reference in New Issue
Block a user