提交 44518ac8 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Adjust memory increase since GpuAllocEmpty does not need a constant.

上级 3f0f841e
...@@ -138,7 +138,7 @@ def test_memory_lazy(): ...@@ -138,7 +138,7 @@ def test_memory_lazy():
# When dtype is float64, only the shared is on the gpu and it is transferd # When dtype is float64, only the shared is on the gpu and it is transferd
# to the cpu for computation. So no extra alloc after compilation. # to the cpu for computation. So no extra alloc after compilation.
# more_alloc1 if after the first compilation, more_alloc2 after the second. # more_alloc1 if after the first compilation, more_alloc2 after the second.
for dtype, more_alloc1 in [("float32", 2), for dtype, more_alloc1 in [("float32", 1),
("float64", 0)]: ("float64", 0)]:
print(dtype) print(dtype)
test_params = np.asarray(np.random.randn(np.prod(shapes)), dtype) test_params = np.asarray(np.random.randn(np.prod(shapes)), dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论