mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-17 19:40:04 +00:00
* add wrw reference
* start device
* raw not split version
* run simple example
* start to use atomic add
* simple transform result correct
* first version that can run
* fix atomic and set operator choice
* add check split-k
* format
* change input parameter
* add pad for t total
* rename example index
Co-authored-by: ltqin <letaoqin@amd.com>
[ROCm/composable_kernel commit: 7a9b93f4b6]
48 lines
1.7 KiB
C++
48 lines
1.7 KiB
C++
#ifndef DEVICE_CONV_WRW_HPP
|
|
#define DEVICE_CONV_WRW_HPP
|
|
|
|
#include <iostream>
|
|
#include "device_base.hpp"
|
|
|
|
namespace ck {
|
|
namespace tensor_operation {
|
|
namespace device {
|
|
|
|
template <typename InElementwiseOperation,
|
|
typename WeiElementwiseOperation,
|
|
typename OutElementwiseOperation>
|
|
struct DeviceConvWrw : public BaseOperator
|
|
{
|
|
virtual std::unique_ptr<BaseArgument>
|
|
MakeArgumentPointer(const void* p_in,
|
|
void* p_wei,
|
|
const void* p_out,
|
|
ck::index_t N,
|
|
ck::index_t K,
|
|
ck::index_t C,
|
|
std::vector<ck::index_t> input_spatial_lengths,
|
|
std::vector<ck::index_t> filter_spatial_lengths,
|
|
std::vector<ck::index_t> output_spatial_lengths,
|
|
std::vector<ck::index_t> conv_filter_strides,
|
|
std::vector<ck::index_t> conv_filter_dilations,
|
|
std::vector<ck::index_t> input_left_pads,
|
|
std::vector<ck::index_t> input_right_pads,
|
|
InElementwiseOperation in_element_op,
|
|
WeiElementwiseOperation wei_element_op,
|
|
OutElementwiseOperation out_element_op,
|
|
ck::index_t split_k) = 0;
|
|
|
|
virtual std::unique_ptr<BaseInvoker> MakeInvokerPointer() = 0;
|
|
};
|
|
|
|
template <typename InElementwiseOperation,
|
|
typename WeiElementwiseOperation,
|
|
typename OutElementwiseOperation>
|
|
using DeviceConvWrwPtr = std::unique_ptr<
|
|
DeviceConvWrw<InElementwiseOperation, WeiElementwiseOperation, OutElementwiseOperation>>;
|
|
|
|
} // namespace device
|
|
} // namespace tensor_operation
|
|
} // namespace ck
|
|
#endif
|