-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making it easier to write unittest for comparing gpu and cpu version of a function #385
Comments
OK, I will refactor the |
A demo of auto compare. |
PR #643 里面增加了一个AutoCompare来简化test case的构造方法,AutoCompare有两种用法:
使用AutoCompare的test case如下:
使用AutoCompare的test case如下:
如果add在BaseMatrix里面是有重载,则这里可以通过static_cast来显示的指定是哪个add函数。
|
还有一些实现上比较奇怪的成员函数目前不能使用AutoCompare,比如:
|
add docker related uninstall info
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.
The text was updated successfully, but these errors were encountered: