-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
De-duplicate Engine Tests #1108
Comments
The increased test time caused by the added (exploding) combination is perhaps not a big deal. But the smell of the code suggests that refactoring is in need. If completed by someone, #610 and #1064 may provide a more thorough solution. There are two or three variants, i.e. CPU, CUDA and cuDNN, with the same functionalities for some layers. There will certainly be more in the future. To be flexible and easily extensible, the implementations of the same layer should be split into separate classes inheriting a common abstract base class. For example, AbstractConvolutionLayer is inherited by CPUConvolutionLayer, CUDAConvolutionLayer and CuDNNConvolutionLayer. The modularity of the layers can also be achieved by other designs. Each family of layers could be produced by the corresponding CPU, CUDA and CuDNN LayerFactory. There are layers that only have CPU version or CPU plus CUDA version. To avoid having to manually track which layer have what versions which is cumbersome, the CuDNNLayerFactory had better subclass CUDALayerFactory which then inherits CPULayerFactory. The subclasses only override the methods to produce the layers that are implemented in the specific flavors. |
While the full abstract class and inherited strategies design has its
I could imagine a factory and strategy design exists to handle this, but For the tests, de-duplication could come through pulling the test method On Saturday, September 20, 2014, kloudkl notifications@github.com wrote:
|
A not insignificant amount of the cuDNN integration diff was testing, but these tests are mostly mirrors of the Caffe standard tests with the engine swapped between CAFFE and CUDNN. These should be de-duplicated by a
TestDtypesAndDevicesAndEngines
scheme or simply a vector of the two layer objects for clarity and ease of maintenance.The text was updated successfully, but these errors were encountered: