fix im2col_test.cc on cpu only machine

Adaptive_data_structure_for_SwitchOrderLayer
qiaolongfei 8 years ago
parent 0146e8bfc5
commit 02bf1375e6

@ -71,8 +71,12 @@ void testIm2col() {
context =
new paddle::platform::CPUDeviceContext(paddle::platform::CPUPlace());
} else {
#ifndef PADDLE_ONLY_CPU
context =
new paddle::platform::CUDADeviceContext(paddle::platform::GPUPlace());
#else
PADDLE_THROW("no GPU support");
#endif // PADDLE_ONLY_CPU
}
im2col(input, output_cfo, stride, stride, padding, padding, context);
im2col_ocf(input, output_ocf, stride, stride, padding, padding, context);

Loading…
Cancel
Save