-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Closed
Description
math/tests里面主要包含对Paddle的一些基本算法实现的测试,但是当前构造tests的自由度比较高,基本可以任意书写test case,这导致代码有很多冗余 #385 ,并且导致很多test case阅读起来也比较困难。tests模块的重构是math模块重构的一部分。
重构主要解决的问题:
- 定义tests case的书写方式,在issue Making it easier to write unittest for comparing gpu and cpu version of a function #385 和pr Auto compare cpu and gpu function. #643 中引入了AutoCompare,能够基本以一种固定的格式来书写test case;
test_matrixCompare.cpp中的test case根据被测试的类型对象分到test_BaseMatrix.cpp,test_Matrix.cpp,test_Vector.cpp,test_SparseMatrix.cpp等不同文件中;test_matrixCompare.cpp中不能被AutoCompare覆盖的test case,需定义一个新的统一的方式来书写test case,或者有些是需要修改源码实现的。
Metadata
Metadata
Assignees
Labels
No labels