mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-12 09:16:52 +00:00
* Add maxpool instances * Rename index pool to max pool. * Add maxpool bwd bf16 instances * Add avg pool bwd instances * Rename avgpool and maxpool to avg_pool3d and max_pool * Add bf16 pool fwd instances * Add max pool bwd to ckProfiler * Add avg pool3d bwd to ckProfiler * Add avg pool bwd test * Fix bug of reference pool fwd (dilation) * Fix bug of max pool bwd (dilation and initZero) * Support bf16 compute data type * Force compute type be f32. Because atomicAdd only support f32 * Add max pool bwd test * Rename folder * Rename pool * Add max pool bwd client example * Add avg pool bwd client example * Add missing workspace * clang format * Rename macro * remove useless header * remove useless layout
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
|
|
|
|
#include "gtest/gtest.h"
|
|
#include "ck/ck.hpp"
|
|
|
|
using F16 = ck::half_t;
|
|
using BF16 = ck::bhalf_t;
|
|
using F32 = float;
|
|
using I32 = int32_t;
|
|
using ck::index_t;
|
|
using NDHWC = ck::tensor_layout::convolution::NDHWC;
|
|
|
|
struct PoolingParam
|
|
{
|
|
PoolingParam(const std::vector<index_t>& length,
|
|
const std::vector<index_t>& window_spatial_lengths,
|
|
const std::vector<index_t>& window_strides,
|
|
const std::vector<index_t>& window_dilations,
|
|
const std::vector<index_t>& input_left_pads,
|
|
const std::vector<index_t>& input_right_pads)
|
|
: length_(length),
|
|
window_spatial_lengths_(window_spatial_lengths),
|
|
window_strides_(window_strides),
|
|
window_dilations_(window_dilations),
|
|
input_left_pads_(input_left_pads),
|
|
input_right_pads_(input_right_pads)
|
|
{
|
|
}
|
|
std::vector<index_t> length_;
|
|
std::vector<index_t> window_spatial_lengths_;
|
|
std::vector<index_t> window_strides_;
|
|
std::vector<index_t> window_dilations_;
|
|
std::vector<index_t> input_left_pads_;
|
|
std::vector<index_t> input_right_pads_;
|
|
};
|