Commit 67844320 authored by gcwenger's avatar gcwenger Committed by Robert Kimball

Improved AvgPool unit test coverage. Fixed small bug that was revealed. (#1813)

* Improved AvgPool unit test coverage. Fixed small bug that was revealed.

* Renamed disabled unit tests to reflect new names.

* Ran clang-format on backend_test.in.cpp to fix format.

* Renamed cpu_results->backend_results in two unit tests.
parent 3fece336
......@@ -233,35 +233,33 @@ void runtime::gpu::GPU_Emitter::emit_AvgPool(EMIT_ARGS)
{
auto& cuda_emitter = external_function->get_primitive_emitter()->get_cuda_emitter();
index = cuda_emitter->build_avg_pool({{args[0].get_type(), out[0].get_type()}},
input_shape,
result_shape,
avg_pool->get_window_shape(),
avg_pool->get_window_movement_strides(),
padding_below);
index =
cuda_emitter->build_avg_pool({{args[0].get_type(), out[0].get_type()}},
input_shape,
result_shape,
avg_pool->get_window_shape(),
avg_pool->get_window_movement_strides(),
padding_below,
avg_pool->get_include_padding_in_avg_computation());
}
else if (input_shape.size() <= 5)
// 2d and 3d avg pool (NCHW) with either symetric padding or no padding
else if (input_shape.size() == 4 || input_shape.size() == 5)
{
// 2d and 3d avg pool (NCHW) with either symetric padding or no padding
if (input_shape.size() == 4 || input_shape.size() == 5)
{
auto& cudnn_emitter =
external_function->get_primitive_emitter()->get_cudnn_emitter();
auto& cudnn_emitter = external_function->get_primitive_emitter()->get_cudnn_emitter();
auto cudnn_avg_type = avg_pool->get_include_padding_in_avg_computation()
? CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING
: CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING;
index = cudnn_emitter->build_pooling(cudnn_avg_type,
out[0].get_type(),
CUDNNEmitter::Prop::Forward,
input_shape,
result_shape,
avg_pool->get_window_movement_strides(),
avg_pool->get_window_shape(),
padding_below,
padding_above);
}
auto cudnn_avg_type = avg_pool->get_include_padding_in_avg_computation()
? CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING
: CUDNN_POOLING_AVERAGE_COUNT_EXCLUDE_PADDING;
index = cudnn_emitter->build_pooling(cudnn_avg_type,
out[0].get_type(),
CUDNNEmitter::Prop::Forward,
input_shape,
result_shape,
avg_pool->get_window_movement_strides(),
avg_pool->get_window_shape(),
padding_below,
padding_above);
}
else
{
......
......@@ -29,8 +29,6 @@ backwards_maxpool_n2_c1_hw5_3x3_str2_max
backwards_avgpool_n1_c1_hw2x2
backwards_avgpool_n1_c1_hw4x4
backwards_avgpool_n2_c2_hw4x4
max_pool_3d
avg_pool_3d
topk_1d_max_all
topk_1d_max_partial
topk_1d_max_one
......
avg_pool_2d_2channel_2image_padded_only_above
avg_pool_3d
avg_pool_2d_2channel_2image_padded_only_above_do_not_include_in_computation
avg_pool_2d_2channel_2image_padded_only_above_include_in_computation
avg_pool_3d_strided_uneven_padded_do_not_include_in_computation
avg_pool_3d_uneven_strided_padded_include_in_computation
backwards_batch_norm_three_outputs
backwards_dot_scalar_tensor
backwards_dot_tensor3_tensor3
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment