pytorch/test/dynamo/mock_modules/mock_module2.py
Jason Ansel c7c09722ad Move TorchDynamo into PyTorch core (#86461)
Context:
https://github.com/pytorch/torchdynamo/issues/1588

This PR moves [TorchDynamo](https://github.com/pytorch/torchdynamo) and TorchInductor into PyTorch core.
- `torchdynamo` becomes `torch._dynamo`
- `torchinductor` becomes `torch._inductor`

This PR was generated by running `copy_to_core.sh` in https://github.com/pytorch/torchdynamo/pull/1538

Pull Request resolved: https://github.com/pytorch/pytorch/pull/86461
Approved by: https://github.com/voznesenskym
2022-10-13 23:18:06 +00:00

20 lines
295 B
Python

# from . import mock_module3
import torch
from . import mock_module3
class Class1:
def __init__(self, x, y):
self.x = x
self.y = y
def method2(self, x):
return mock_module3.method1([], x)
def method1(x, y):
torch.ones(1, 1)
x.append(y)
return x