| 32 | |
| 33 | |
| 34 | class Module(torch.nn.Module): |
| 35 | def __init__(self): |
| 36 | super().__init__() |
| 37 | self.register_buffer("a", 3 * torch.ones(2, 2, dtype=torch.float)) |
| 38 | self.register_buffer("b", 2 * torch.ones(2, 2, dtype=torch.float)) |
| 39 | |
| 40 | def forward(self, x): |
| 41 | a = torch.mul(self.a, x) |
| 42 | b = torch.add(a, self.b) |
| 43 | return b |
| 44 | |
| 45 | |
| 46 | class TestCustomOps(unittest.TestCase): |