Skip to content

Commit

Permalink
Fix cat tests (pytorch#1086)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: pytorch#1086

Reviewed By: mcr229

Differential Revision: D50504935

fbshipit-source-id: 6b541d0558f1cb1ea99893a3cfa96ba35161c5d8
  • Loading branch information
kirklandsign authored and facebook-github-bot committed Oct 24, 2023
1 parent c6c2ea9 commit 427641c
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions backends/xnnpack/test/ops/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,18 @@ def forward(self, x, y):
def test_fp32_cat(self):
inputs = (torch.ones(1, 2, 3), torch.ones(3, 2, 3))
(
Tester(self.Cat(), inputs).export()
# .check_count({"torch.ops.aten.cat": 1})
# .to_edge()
# .check_count({"executorch_exir_dialects_edge__ops_aten_cat": 1})
# .partition()
# .check_count({"torch.ops.executorch_call_delegate": 1})
# .check_not(["executorch_exir_dialects_edge__ops_aten_cat"])
# .to_executorch()
# .serialize()
# .run_method()
# .compare_outputs()
Tester(self.Cat(), inputs)
.export()
.check_count({"torch.ops.aten.cat": 1})
.to_edge()
.check_count({"executorch_exir_dialects_edge__ops_aten_cat": 1})
.partition()
.check_count({"torch.ops.executorch_call_delegate": 1})
.check_not(["executorch_exir_dialects_edge__ops_aten_cat"])
.to_executorch()
.serialize()
.run_method()
.compare_outputs()
)

class CatNegativeDim(torch.nn.Module):
Expand Down

0 comments on commit 427641c

Please sign in to comment.