Created by: NHZlX
The previous allocator is the best fit version. We use EnableUseGpu (N, 0) interface to specify the size of the memory pool. N represents the size of the pre allocated memory. When the number of temporary tensor allocations exceeds N, cudaMalloc, cudaFree will be called to allocate and release the memory which will slow prediction performance.
So we adopt the auto growth version for inference which will auto adds external storage to memory pool when the number of temporary tensor allocations exceeds N.