How to make GPU resources management in the new tensor library
Created by: QiJune
Now, paddle has two directories, paddle/math and paddle/cuda, which are related to matrix library. We want to design a new tensor library, which could be independent from paddle. The new tensor library can be used in any other framework too. In the new tensor library, we have to get the device information and manage the GPU resources efficiently. The GPU resources includes device memory, some computing handles(cublasHandle, cudnnHandle), and cuda stream. It's need to be discussed that we expose our api to what extent.