Skip to content

Commit aff6f68

Browse files
digantdesaifacebook-github-bot
authored andcommitted
Stop SymInt from coming in (#1778)
Summary: Pull Request resolved: #1778 Drop an op with a non-tensor arg. This can be improved upon later. Reviewed By: mcr229 Differential Revision: D53248930 fbshipit-source-id: 004e6dd420a9d6c9753aca96c380033e650f3a54
1 parent 14d9699 commit aff6f68

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

backends/xnnpack/partition/xnnpack_partitioner.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ def check_node_has_valid_dtype(self, node):
125125
if arg_val is None or isinstance(arg_val, tuple):
126126
continue
127127

128+
# Being conservative for now, UX >> Perf
129+
# TODO: We need a pass to scrub these out.
130+
if not isinstance(arg_val, torch.Tensor):
131+
return False
132+
128133
if arg_val.dtype not in valid_dtypes:
129134
return False
130135

@@ -135,6 +140,9 @@ def check_node_has_valid_dtype(self, node):
135140
node_val = (node_val,)
136141

137142
for val in node_val:
143+
if not isinstance(val, torch.Tensor):
144+
return False
145+
138146
if val.dtype not in valid_dtypes:
139147
return False
140148

0 commit comments

Comments
 (0)