Skip to content

Commit 815ae92

Browse files
authored
Update ReplaceSingleElementTensorArgumentsFromFullOpWithScalarPass to check if is_tensor() is valid
Differential Revision: D83861005 Pull Request resolved: #14798
1 parent ed3fdad commit 815ae92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backends/cadence/aot/replace_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1590,7 +1590,7 @@ def call_operator(self, op, args, kwargs, meta):
15901590
updated_args = list(args)
15911591
for op_arg_index in args_to_be_replaced:
15921592
arg = args[op_arg_index]
1593-
if not arg.is_tensor():
1593+
if not isinstance(arg, ProxyValue) or not arg.is_tensor():
15941594
return super().call_operator(op, args, kwargs, meta)
15951595

15961596
if not isinstance(arg.node.target, EdgeOpOverload):

0 commit comments

Comments
 (0)