Skip to content

Commit

Permalink
Add preprocessing of list inputs for op by op execution
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanzoorTT committed Feb 11, 2025
1 parent c8b40f3 commit 8fe87e0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tt_torch/dynamo/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,16 @@ def pre_process_inputs(self, *inputs):
if not inp.is_contiguous():
inp = inp.contiguous()
processed_inputs.append(inp)
elif isinstance(inp, list):
for ele in inp:
if isinstance(ele, torch.nn.Parameter):
if not ele.data.is_contiguous():
ele.data = ele.data.contiguous()
processed_inputs.append(ele.data)
elif isinstance(ele, torch.Tensor):
if not ele.is_contiguous():
ele = ele.contiguous()
processed_inputs.append(ele)

# Typecast the unsupported data types to hardware supported types.
supported_inputs = ()
Expand Down

0 comments on commit 8fe87e0

Please sign in to comment.