Skip to content

Commit

Permalink
Make class Im2colKernelTest derive from GPUDeviceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
flx42 committed May 26, 2015
1 parent 8d20104 commit 8a5abbf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/caffe/test/test_im2col_kernel.cu
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ __global__ void im2col_gpu_kernel(const int n, const Dtype* data_im,
extern cudaDeviceProp CAFFE_TEST_CUDA_PROP;

template <typename Dtype>
class Im2colKernelTest : public ::testing::Test {
class Im2colKernelTest : public GPUDeviceTest<Dtype> {
protected:
Im2colKernelTest()
// big so launches > 1024 threads
Expand Down Expand Up @@ -68,8 +68,6 @@ class Im2colKernelTest : public ::testing::Test {
TYPED_TEST_CASE(Im2colKernelTest, TestDtypes);

TYPED_TEST(Im2colKernelTest, TestGPU) {
Caffe::set_mode(Caffe::GPU);

// Reshape the blobs to correct size for im2col output
this->blob_top_->Reshape(this->blob_bottom_->num(),
this->channels_ * this->kernel_size_ * this->kernel_size_,
Expand Down

0 comments on commit 8a5abbf

Please sign in to comment.