You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[torchlib] Fix unbind.int if num_outputs=1 (#2684)
This fixes the issue of
```
return [op.Squeeze(out, [dim]) for out in outputs]
^^^^^^^
TypeError: 'SymbolicTensor' object is not iterable
```
when trying to export LSTM modules in `torch`.
This also already appeared in torch issues in
pytorch/pytorch#126339
The core seems to be the changes in #2597.
To my understanding the split returns a single `SymbolicTensor` instead
of a sequence when `dim=1`.
The fix implemented here is the casting of the return type to a list.
I struggled with writing a test that reproduces this nicely in here, any
guidance on that would be welcome.
---------
Co-authored-by: Justin Chu <[email protected]>
0 commit comments