Skip to content

Commit 484414a

Browse files
izaitsevfbfacebook-github-bot
authored andcommitted
Fix pyre errors
Summary: attempt to fix ``` [executorch/exir/backend/test/demos/rpc/executor_backend_partitioner.py:68:19] Undefined attribute [16]: `None` has no attribute `op`. [executorch/exir/backend/test/demos/rpc/executor_backend_partitioner.py:69:20] Undefined attribute [16]: `None` has no attribute `meta`. [executorch/exir/backend/test/test_backends_nested.py:200:20] Undefined attribute [16]: `None` has no attribute `meta`. ``` in D79768387 Differential Revision: D79828275
1 parent afdbb85 commit 484414a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

exir/backend/test/demos/rpc/executor_backend_partitioner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def partition(self, edge_exported_program: ExportedProgram) -> PartitionResult:
6565
partition_tags[delegation_tag] = self.delegation_spec
6666

6767
# Tag the delegate submodules
68+
# pyre-ignore[16]: node.args[0] is checked above but Pyre can't infer it
6869
if node.args[0].op == "get_attr":
70+
# pyre-ignore[16]: node.args[0] is checked above but Pyre can't infer it
6971
node.args[0].meta["delegation_tag"] = delegation_tag
7072

7173
return PartitionResult(

exir/backend/test/test_backends_nested.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ def _partition_graph_module(
197197
and node.target is torch.ops.higher_order.cond
198198
):
199199
# Tag the arguments that take in the submodules to cond
200+
# pyre-ignore[16]: node.args[1] is checked above but Pyre can't infer it
200201
node.args[1].meta["delegation_tag"] = delegation_tag
202+
# pyre-ignore[16]: node.args[2] is checked above but Pyre can't infer it
201203
node.args[2].meta["delegation_tag"] = delegation_tag
202204
node.meta["delegation_tag"] = delegation_tag
203205
partition_tags[delegation_tag] = self.delegation_spec

0 commit comments

Comments
 (0)