Sets the current allocator for the pinned memory.
allocator (function) – CuPy pinned memory allocator. It must have the same interface as the
cupy.cuda.alloc_pinned_memory()function, which takes the buffer size as an argument and returns the device buffer of that size. When
Noneis specified, raw memory allocator is used (i.e., memory pool is disabled).