#ifdef USE_CUDNN
template <typename Dtype>
-class CuDNNConvolutionLayerTest : public ::testing::Test {
+class CuDNNConvolutionLayerTest : public GPUDeviceTest<Dtype> {
protected:
CuDNNConvolutionLayerTest()
: blob_bottom_(new Blob<Dtype>(2, 3, 6, 4)),
TYPED_TEST_CASE(CuDNNConvolutionLayerTest, TestDtypes);
TYPED_TEST(CuDNNConvolutionLayerTest, TestSetupCuDNN) {
- Caffe::set_mode(Caffe::GPU);
this->blob_bottom_vec_.push_back(this->blob_bottom_2_);
this->blob_top_vec_.push_back(this->blob_top_2_);
LayerParameter layer_param;
}
TYPED_TEST(CuDNNConvolutionLayerTest, TestSimpleConvolutionCuDNN) {
- Caffe::set_mode(Caffe::GPU);
this->blob_bottom_vec_.push_back(this->blob_bottom_2_);
this->blob_top_vec_.push_back(this->blob_top_2_);
LayerParameter layer_param;
}
TYPED_TEST(CuDNNConvolutionLayerTest, TestSimpleConvolutionGroupCuDNN) {
- Caffe::set_mode(Caffe::GPU);
LayerParameter layer_param;
ConvolutionParameter* convolution_param =
layer_param.mutable_convolution_param();
// Test separable convolution by computing the Sobel operator
// as a single filter then comparing the result
// as the convolution of two rectangular filters.
- Caffe::set_mode(Caffe::GPU);
+
// Fill bottoms with identical Gaussian noise.
shared_ptr<GaussianFiller<TypeParam> > filler;
FillerParameter filler_param;
}
TYPED_TEST(CuDNNConvolutionLayerTest, TestGradientCuDNN) {
- Caffe::set_mode(Caffe::GPU);
LayerParameter layer_param;
ConvolutionParameter* convolution_param =
layer_param.mutable_convolution_param();
}
TYPED_TEST(CuDNNConvolutionLayerTest, TestGradientGroupCuDNN) {
- Caffe::set_mode(Caffe::GPU);
LayerParameter layer_param;
ConvolutionParameter* convolution_param =
layer_param.mutable_convolution_param();