From 0dcb55cebeaa85c9f0a46ff62384bbeaae98323e Mon Sep 17 00:00:00 2001 From: maxm Date: Thu, 6 Jul 2017 20:29:51 +0800 Subject: [PATCH] Fix issue 150 : error on Linux System :undefined symbol: _Z22ROIPoolBackwardLaucherPKffiiiiiiiS0_PfPKiRKN5Eigen9GpuDeviceE --- lib/roi_pooling_layer/roi_pooling_op.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) mode change 100644 => 100755 lib/roi_pooling_layer/roi_pooling_op.cc diff --git a/lib/roi_pooling_layer/roi_pooling_op.cc b/lib/roi_pooling_layer/roi_pooling_op.cc old mode 100644 new mode 100755 index 68ce66a8..07419a14 --- a/lib/roi_pooling_layer/roi_pooling_op.cc +++ b/lib/roi_pooling_layer/roi_pooling_op.cc @@ -24,6 +24,7 @@ limitations under the License. #include "tensorflow/core/framework/tensor_shape.h" #include "work_sharder.h" + using namespace tensorflow; typedef Eigen::ThreadPoolDevice CPUDevice; @@ -214,11 +215,12 @@ static void RoiPoolingKernel( if (!context->status().ok()) { return; } - +#if GOOGLE_CUDA ROIPoolForwardLaucher( bottom_data->flat().data(), spatial_scale, num_rois, height, width, channels, pooled_height, pooled_width, bottom_rois->flat().data(), output->flat().data(), argmax->flat().data(), context->eigen_device()); +#endif } template @@ -473,11 +475,12 @@ static void RoiPoolingGradKernel( if (!context->status().ok()) { return; } - +#if GOOGLE_CUDA ROIPoolBackwardLaucher( out_backprop->flat().data(), spatial_scale, batch_size, num_rois, height, width, channels, pooled_height, pooled_width, bottom_rois->flat().data(), output->flat().data(), argmax_data->flat().data(), context->eigen_device()); +#endif }