aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/kernels/maxpooling_op_gpu.h
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <benoit.steiner.goog@gmail.com>2016-06-06 16:28:11 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-06-06 17:33:08 -0700
commit5a84537852ef9b164bad165c8450bde67d30df05 (patch)
tree80c3728a8d1ebcdb9b7f96e2e52f303ab5bc6548 /tensorflow/core/kernels/maxpooling_op_gpu.h
parentded14ab7e10349a55ad365df70b25582202e6873 (diff)
Enable fp16 for most of the pooling ops (MaxPool, AvgPool, associated
gradients, some variants etc.). Change: 124197406
Diffstat (limited to 'tensorflow/core/kernels/maxpooling_op_gpu.h')
-rw-r--r--tensorflow/core/kernels/maxpooling_op_gpu.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/tensorflow/core/kernels/maxpooling_op_gpu.h b/tensorflow/core/kernels/maxpooling_op_gpu.h
index 05e865f81c..d1c73a372e 100644
--- a/tensorflow/core/kernels/maxpooling_op_gpu.h
+++ b/tensorflow/core/kernels/maxpooling_op_gpu.h
@@ -37,11 +37,24 @@ bool MaxPoolForwardWithOptionalArgmax(
const int stride_h, const int stride_w, const int pad_t, const int pad_l,
float* top_data, int64* mask, const Eigen::GpuDevice& d);
+bool MaxPoolForwardWithOptionalArgmax(
+ const Eigen::half* bottom_data, const int batch, const int height,
+ const int width, const int channels, const int pooled_height,
+ const int pooled_width, const int kernel_h, const int kernel_w,
+ const int stride_h, const int stride_w, const int pad_t, const int pad_l,
+ Eigen::half* top_data, int64* mask, const Eigen::GpuDevice& d);
+
bool MaxPoolBackwardWithArgmax(const int output_size, const int input_size,
const float* top_diff, const int64* mask,
const int top_offset, const int bottom_offset,
float* bottom_diff, const Eigen::GpuDevice& d);
+bool MaxPoolBackwardWithArgmax(const int output_size, const int input_size,
+ const Eigen::half* top_diff, const int64* mask,
+ const int top_offset, const int bottom_offset,
+ Eigen::half* bottom_diff,
+ const Eigen::GpuDevice& d);
+
bool MaxPoolBackwardNoMask(const float* bottom_data, const int batch,
const int height, const int width,
const int channels, const int pooled_height,
@@ -51,6 +64,15 @@ bool MaxPoolBackwardNoMask(const float* bottom_data, const int batch,
const float* top_diff, float* bottom_diff,
const Eigen::GpuDevice& d);
+bool MaxPoolBackwardNoMask(const Eigen::half* bottom_data, const int batch,
+ const int height, const int width,
+ const int channels, const int pooled_height,
+ const int pooled_width, const int kernel_h,
+ const int kernel_w, const int stride_h,
+ const int stride_w, const int pad_t, const int pad_l,
+ const Eigen::half* top_diff, Eigen::half* bottom_diff,
+ const Eigen::GpuDevice& d);
+
} // namespace tensorflow
#endif // TENSORFLOW_CORE_KERNELS_MAXPOOLING_OP_GPU_H_