Skip to content

Commit

Permalink
python-black reformatted
Browse files Browse the repository at this point in the history
  • Loading branch information
brucekimrokcmu committed Jul 25, 2023
1 parent e25a214 commit a4d4e34
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/unit/test_list_int_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
)
from util import check_correct


class TestListIntBindings:
def test_max_pool2d(self):
with mlir_mod_ctx():
t = pi.rand(1, 3, 32, 32)
l = ops.max_pool2d(t, 3, 1)
check_correct(
" %4 = torch.aten.max_pool2d %arg0, %1, %2, %3, %0, %false : !torch.tensor<[1,3,32,32],f64>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool -> !torch.tensor",
" %4 = torch.aten.max_pool2d %arg0, %1, %2, %3, %0, %false : !torch.tensor<[1,3,32,32],f64>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool -> !torch.tensor",
l.owner
)

Expand All @@ -41,13 +42,12 @@ def test_max_pool2d(self):
l.owner
)


t = pi.rand(1, 3, 32, 32)
l = ops.max_pool2d(t, 3, 1, [2, 2], 3)
check_correct(
" %4 = torch.aten.max_pool2d %arg0, %1, %2, %3, %0, %false : !torch.tensor<[1,3,32,32],f64>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool -> !torch.tensor",
l.owner
)
" %4 = torch.aten.max_pool2d %arg0, %1, %2, %3, %0, %false : !torch.tensor<[1,3,32,32],f64>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool -> !torch.tensor",
l.owner
)

def test_max_pool2d_with_indices(self):
with mlir_mod_ctx():
Expand Down Expand Up @@ -78,6 +78,3 @@ def test_max_pool2d_with_indices(self):
"%result0, %result1 = torch.aten.max_pool2d_with_indices %arg0, %0, %1, %2, %1, %false : !torch.tensor<[1,3,32,32],f64>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.list<int>, !torch.bool -> !torch.tensor, !torch.tensor",
l.owner
)



0 comments on commit a4d4e34

Please sign in to comment.