Skip to content

Commit e462e5a

Browse files
mcr229facebook-github-bot
authored andcommitted
Bug fix partitioner (#5239)
Summary: Pull Request resolved: #5239 Forgot to copy over this part of the constraint when I refactored the partitioner Reviewed By: balakv504, kirklandsign Differential Revision: D62471496 fbshipit-source-id: d2fb76ffd2dea5671b38f89e050beac3a35aff4e
1 parent 75a56a2 commit e462e5a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backends/xnnpack/partition/config/node_configs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ def check_constraints(self, node: torch.fx.Node, ep: ExportedProgram) -> bool:
8585
supported_dtypes = {torch.float32, torch.float16, torch.int8, torch.qint8}
8686
node_val = node.meta.get("val")
8787
output_0 = node_val[0]
88+
89+
input_node = node.all_input_nodes[0]
90+
if len(input_node.meta.get("val").shape) != 4:
91+
why(node, f"Unsupported input rank {input_node.meta.get('val').shape}")
92+
return False
8893
# Don't check indicies dtype
8994
if output_0.dtype not in supported_dtypes:
9095
why(node, f"Unsupported output dtype {output_0.dtype}")

0 commit comments

Comments
 (0)