MNN/source/backend/cuda/execution/ReductionExecution.hpp

32 lines
875 B
C++
Raw Normal View History

2020-11-05 16:41:56 +08:00
//
// ReductionExecution.hpp
// MNN
//
// Created by MNN on 2020/08/05.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef ReductionExecution_hpp
#define ReductionExecution_hpp
#include <vector>
#include "backend/cuda/core/CUDABackend.hpp"
#include "core/Execution.hpp"
2022-02-18 11:30:27 +08:00
#include "ReductionTemplate.cuh"
2020-11-05 16:41:56 +08:00
namespace MNN {
namespace CUDA {
class ReductionExecution : public Execution {
public:
ReductionExecution(ReductionType opType, int axis, Backend *backend);
virtual ~ReductionExecution();
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
2022-02-18 11:30:27 +08:00
virtual ErrorCode onResize(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
2020-11-05 16:41:56 +08:00
private:
ReductionType mType;
int mAxis;
2022-02-18 11:30:27 +08:00
ReduceParam mCpuParam;
2020-11-05 16:41:56 +08:00
};
} // namespace CUDA
} // namespace MNN
#endif