revert to the default memory pool
@@ -612,12 +612,13 @@ class TestMemoryPool(unittest.TestCase):
class TestAllocator(unittest.TestCase):
def setUp(self):
+ self.old_pool = cupy.get_default_memory_pool()
self.pool = memory.MemoryPool()
memory.set_allocator(self.pool.malloc)
def tearDown(self):
- memory.set_allocator()
self.pool.free_all_blocks()
+ memory.set_allocator(self.old_pool.malloc)
def test_set_allocator(self):
with cupy.cuda.Device(0):
