Commit 0fe566a0 authored by wooway777's avatar wooway777
Browse files

issue/759 - list input adjustments

parent f53b8435
......@@ -353,7 +353,11 @@ class BaseOperatorTest(ABC):
inp, comparison_target == i
)
infini_inputs.append(infini_list)
cloned_tensors.append(cloned_list)
# assuming no input lists are operated inplace
if len(cloned_list) > 0:
raise Exception(
"Unconsidered case: inplace operation on input list"
)
else:
infini_inputs.append(inp)
......@@ -374,6 +378,9 @@ class BaseOperatorTest(ABC):
infini_list, cloned_list = self.prepare_infinicore_list(
value, key == "out"
)
if key == "out" and len(cloned_list) > 0:
# not expected to reach here until an operator supports inplace on list output
# torch.broadcast_tensors returns a list of tensors but doesn't require an out kwarg.
cloned_tensors.append(cloned_list)
infini_kwargs[key] = infini_list
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment