Skip to content

Commit

Permalink
fix test code to free memory pool
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaehashi committed Apr 6, 2018
1 parent b3b9835 commit fb65ce6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/cupy_tests/manipulation_tests/test_join.py
Expand Up @@ -108,12 +108,16 @@ def test_concatenate_many_multi_dptye(self, xp):
b = testing.shaped_arange((2, 1), xp, 'f')
return xp.concatenate((a, b) * 1024, axis=1)

@testing.numpy_cupy_array_equal()
@testing.slow
def test_concatenate_32bit_boundary(self, xp):
a = xp.zeros((2 ** 30,), dtype=xp.int8)
b = xp.zeros((2 ** 30,), dtype=xp.int8)
return xp.concatenate([a, b])
def test_concatenate_32bit_boundary(self):
a = cupy.zeros((2 ** 30,), dtype=cupy.int8)
b = cupy.zeros((2 ** 30,), dtype=cupy.int8)
ret = cupy.concatenate([a, b])
del a
del b
del ret
# Free huge memory for slow test
cupy.get_default_memory_pool().free_all_blocks()

def test_concatenate_wrong_ndim(self):
a = cupy.empty((2, 3))
Expand Down

0 comments on commit fb65ce6

Please sign in to comment.