This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
Repositories
Datasets
Forum
实训
竞赛
大数据
应用
Register
Sign In
OpenI
/
MegEngine
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
31
Wiki
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
Browse Source
test(mge): disable gc in leak check
GitOrigin-RevId:
b650a46e02
release-1.1
Megvii Engine Team
4 years ago
parent
5d0f8da46a
commit
176268d20c
1 changed files
with
10 additions
and
6 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+10
-6
imperative/python/test/unit/core/test_autodiff.py
+ 10
- 6
imperative/python/test/unit/core/test_autodiff.py
View File
@@ -163,12 +163,16 @@ def test_release():
def check(f):
n = 0
d = None
for i in range(3):
f()
m = len(gc.get_objects())
d = m - n
n = m
assert d == 0
gc.disable()
try:
for i in range(3):
f()
m = len(gc.get_objects())
d = m - n
n = m
assert d == 0
finally:
gc.enable()
x = TensorWrapper([0.0])
dy = TensorWrapper(np.ones_like(x.numpy()))
Write
Preview
Loading…
Cancel
Save