aten/src/ATen/native/quantized/cudnn/Pooling.cpp
// TODO: This function is the same as that of qpool.cpp. We should refactor this into quantized directory
// so that we don't need to duplicate the function
This function is the same as that of qpool.cpp. We should refactor this into quantized directory
so that we don't need to duplicate the function
This function is the same as that of qpool . cpp . We should refactor this into quantized directory so that we don ' t need to duplicate the function
void check_maxpool2d_params(
    IntArrayRef kernel_size,
    IntArrayRef stride,
    IntArrayRef padding,
    IntArrayRef dilation) {
  TORCH_CHECK(kernel_size.size() == 1 || kernel_size.size() == 2,
              "Expected 1d or 2d kernel size, got ", kernel_size.size());
  TORCH_CHECK(stride.empty() || stride.size() == 2,
              "Expected no strides or 2d strides, got", stride.size());
  TORCH_CHECK(padding.size() == 1 || padding.size() == 2,
              "Expected 1d or 2d padding, got ", padding.size());
  TORCH_CHECK(dilation.size() == 1 || dilation.size() == 2,
              "Expected 1d or 2d dilation, got ", dilation.size());
}
void check_maxpool2d_params ( IntArrayRef kernel_size , IntArrayRef stride , IntArrayRef padding , IntArrayRef dilation ) { TORCH_CHECK ( kernel_size . size ( ) == 1 || kernel_size . size ( ) == 2 , " " , kernel_size . size ( ) ) ; TORCH_CHECK ( stride . empty ( ) || stride . size ( ) == 2 , " " , stride . size ( ) ) ; TORCH_CHECK ( padding . size ( ) == 1 || padding . size ( ) == 2 , " " , padding . size ( ) ) ; TORCH_CHECK ( dilation . size ( ) == 1 || dilation . size ( ) == 2 , " " , dilation . size ( ) ) ; }
TODO: This function is the same as that of qpool.cpp.
TODO : This function is the same as that of qpool . cpp .