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
The running the following snippet enters an infinite loop:
importthunderimporttorchdeffoo(a, b):
x=a.add(1)
y=x.view(-1)
z=x.view(-1)
x.add_(1)
# y should have been updated.y2=y+1# z should have been updated too.z2=z+1returnz2a=torch.rand(10)
b=torch.rand(10)
jfoo=thunder.(foo)
jfoo(a, b)
Interrupting the program produces the following line in the trace:
This line comes from a search over the graph defined by swap_map, which terminates when a leaf (a value which is not also a key) is reached. However for the function defined above swap_map contains a key-value pair where the key is the same as the value, resulting in an infinite loop.
Note the behavior is dependent on the shape of a.
The text was updated successfully, but these errors were encountered:
The running the following snippet enters an infinite loop:
Interrupting the program produces the following line in the trace:
This line comes from a search over the graph defined by
swap_map
, which terminates when a leaf (a value which is not also a key) is reached. However for the function defined aboveswap_map
contains a key-value pair where the key is the same as the value, resulting in an infinite loop.Note the behavior is dependent on the shape of
a
.The text was updated successfully, but these errors were encountered: