Skip to content

Commit 74096e0

Browse files
committed
add nested graph break tests
ghstack-source-id: 660edce Pull Request resolved: #144516
1 parent 7b5d801 commit 74096e0

11 files changed

+544
-10
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import torch
2+
3+
4+
global1 = torch.ones(3)
5+
6+
7+
def reset_state():
8+
global global1
9+
global1 = torch.ones(3)
10+
11+
12+
def fn(val, call):
13+
global global1
14+
global1 += 1
15+
val = val + global1
16+
val = call(val)
17+
val = val + 1
18+
return val

0 commit comments

Comments
 (0)