Skip to content

Commit f6bb143

Browse files
authored
Add coverage for minimum in TestPasses.test_remove_mixed_type_operators (#12156)
1 parent 557b4de commit f6bb143

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exir/tests/test_passes.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,14 @@ class Mult(torch.nn.Module):
146146
def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
147147
return x * y
148148

149+
class Minimum(torch.nn.Module):
150+
def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor:
151+
return torch.minimum(x, y)
152+
149153
for module, op, expected_count in (
150154
(Add, exir_ops.edge.aten.add.Tensor, 2),
151155
(Mult, exir_ops.edge.aten.mul.Tensor, 1),
156+
(Minimum, exir_ops.edge.aten.minimum.default, 1),
152157
):
153158
for second_arg_dtype in (torch.int64, torch.float, torch.double):
154159
int_tensor = torch.tensor([[1, 2, 3]], dtype=torch.int64)

0 commit comments

Comments
 (0)