Skip to content

Commit 141fcf6

Browse files
SS-JIAfacebook-github-bot
authored andcommitted
Forward fix test_create_submodule_list_return to be backwards compatible (#591)
Summary: Pull Request resolved: #591 From `TODO` comment: `split.Tensor` now gets decomposed to split_with_sizes. Due to how executorch uses a pinned Pytorch nightly, the CI may not catch the changes to Pytorch's core decomposition table. As a temporary workaround, make the test backwards compatible with the old decomposition table. Remove the or statement once Pytorch nightly has been updated. Reviewed By: dbort Differential Revision: D49878902 Privacy Context Container: L1124100 fbshipit-source-id: f2ab4a035aa7e0dd3208b6352432a7afe4f255d9
1 parent d5547f1 commit 141fcf6

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

exir/tests/test_delegate.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,13 @@ def forward(self, x, y):
288288

289289
node_list = []
290290
for node in gm.graph.nodes:
291-
if (
292-
node.op == "call_function"
293-
and node.target == exir_ops.edge.aten.split_with_sizes_copy.default
291+
# TODO(ssjia): split.Tensor now gets decomposed to split_with_sizes. Due to how executorch uses a pinned Pytorch
292+
# nightly, the CI may not catch the changes to Pytorch's core decomposition table. As a temporary workaround,
293+
# make the test backwards compatible with the old decomposition table. Remove the or statement once Pytorch nightly
294+
# has been updated.
295+
if node.op == "call_function" and (
296+
node.target == exir_ops.edge.aten.split_with_sizes_copy.default
297+
or node.target == exir_ops.edge.aten.split_copy.Tensor
294298
):
295299
node_list.append(node)
296300

0 commit comments

Comments
 (0)