File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ def replace_args_with_alias_map(
7272 alias_tensor_indices : list [list [int ]],
7373) -> tuple [Trace , list [set [VariableInterface ]]]:
7474 if not alias_tensor_indices :
75- return computation_trace , {}
75+ return computation_trace , []
7676 bsyms : list [BoundSymbol ] = []
7777 flat_args , _ = tree_flatten ((computation_trace .args , computation_trace .kwargs ))
7878 swap_map_for_aliases : dict [VariableInterface , TensorProxy ] = {}
@@ -82,7 +82,7 @@ def replace_args_with_alias_map(
8282 arg = flat_args [indices [0 ]]
8383 for idx in filter (lambda idx : idx < len (flat_args ), indices [1 :]):
8484 arg_to_replace = flat_args [idx ]
85- # Skip aliases with different numel (e.g., complex tensor and its real view)
85+ # Track aliases with different numel (e.g., complex tensor and its real view)
8686 # These share storage but have incompatible element counts
8787 if not _can_be_reshaped (arg , arg_to_replace ):
8888 view_groups .setdefault (variableify (arg ), []).append (variableify (arg_to_replace ))
You can’t perform that action at this time.
0 commit comments