提交 a3987a12 authored 作者: Frederic's avatar Frederic

Update test following the postponing of allocation of the device structure of CudaNdarray.

上级 c056820d
...@@ -62,7 +62,7 @@ def test_memory(): ...@@ -62,7 +62,7 @@ def test_memory():
# 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, more_alloc2 in [("float32", 2, 9), for dtype, more_alloc1, more_alloc2 in [("float32", 1, 4),
("float64", 0, 0)]: ("float64", 0, 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)
...@@ -129,7 +129,7 @@ def test_memory_lazy(): ...@@ -129,7 +129,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", 3), for dtype, more_alloc1 in [("float32", 2),
("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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论