PyTorch version: 1.6.0.dev20200407+cu101
When use torch.jit._overload_method to overload functions, it seems that there is no graph attribute in the output torchscript.
class MyModule(nn.Module):
    def __init__(self):
        super().__init__()

    @torch.jit._overload_method  # noqa: F811
    def forward(self, x: int) -> int:  # noqa: F811
        pass

    @torch.jit._overload_method  # noqa: F811
    def forward(self, x: torch.Tensor) -> torch.Tensor:  # noqa: F811
        pass

    def forward(self, x):  # noqa: F811
        original = x

        if isinstance(original, int):
            return original + 2
        else:
            return original.sum()

model = MyModule()
s = torch.jit.script(model)
torch._C._jit_pass_inline(s.graph)  # error happens here

error message:
torch.nn.modules.module.ModuleAttributeError: 'RecursiveScriptModule' object has no attribute 'graph'