Skip to content

Commit

Permalink
Merge pull request #3329 from okuta/use-cupy-allocator
Browse files Browse the repository at this point in the history
Use CuPy default memory pool
  • Loading branch information
mitmul committed Nov 6, 2017
2 parents 84c854e + bb0b47d commit fa55e1c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions chainer/cuda.py
Expand Up @@ -130,10 +130,9 @@ def __ne__(self, other):
# Global states
# ------------------------------------------------------------------------------
if available:
memory_pool = cuda.MemoryPool()
cuda.set_allocator(memory_pool.malloc)
pinned_memory_pool = cuda.PinnedMemoryPool()
cuda.set_pinned_memory_allocator(pinned_memory_pool.malloc)
# This is for backward compatibility
memory_pool = cupy.get_default_memory_pool()
pinned_memory_pool = cupy.get_default_pinned_memory_pool()


if six.PY2:
Expand Down

0 comments on commit fa55e1c

Please sign in to comment.