cupy.cuda.set_allocator

cupy.cuda.set_allocator(allocator=_malloc)

Sets the current allocator.

Parameters:allocator (function) – CuPy memory allocator. It must have the same interface as the cupy.cuda.alloc() function, which takes the buffer size as an argument and returns the device buffer of that size.