mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[dynamo] Return gm.forward for eager backend (#124109)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/124109 Approved by: https://github.com/yanboliang, https://github.com/jansel ghstack dependencies: #124445
This commit is contained in:
committed by
PyTorch MergeBot
parent
febc4d8759
commit
a32eac345f
@ -21,7 +21,7 @@ This file contains TorchDynamo backends intended for debugging uses.
|
||||
|
||||
@register_backend
|
||||
def eager(gm, fake_tensor_inputs):
|
||||
return gm
|
||||
return gm.forward
|
||||
|
||||
|
||||
@register_backend
|
||||
|
@ -208,7 +208,7 @@ class EagerAndRecordGraphs:
|
||||
|
||||
def __call__(self, gm: torch.fx.GraphModule, example_inputs: List[torch.Tensor]):
|
||||
self.graphs.append(gm)
|
||||
return gm
|
||||
return gm.forward
|
||||
|
||||
|
||||
def strip_comment(code) -> str:
|
||||
|
Reference in New Issue
Block a user