Making it easier to write unittest for comparing gpu and cpu version of a function
Created by: emailweixu
Currently, the unittest for comparison of the gpu and cpu version of a same function is quite tedious. An exmaple is https://github.com/baidu/Paddle/pull/358/files/3404bf1e85377a9f50008c95b74017f96bd28f36..f502b0c33ef770cd14c6aea1e6c429900d18d36e
Should add some utility function so that a developer only need to provide the function name for comparing the two versions of function. The utility function will responsible for generating data, running through different size of matrix and comparing the results.