2019-04-17 10:49:11 +08:00
|
|
|
//
|
2021-03-12 18:41:50 +08:00
|
|
|
// InterpBufExecution.hpp
|
2019-04-17 10:49:11 +08:00
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2019/02/02.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
2021-03-12 18:41:50 +08:00
|
|
|
#ifndef MNN_OPENCL_BUFFER_CLOSED
|
|
|
|
|
|
|
|
#ifndef InterpBufExecution_hpp
|
|
|
|
#define InterpBufExecution_hpp
|
2019-04-17 10:49:11 +08:00
|
|
|
|
2024-04-19 11:58:21 +08:00
|
|
|
#include "backend/opencl/execution/image/CommonExecution.hpp"
|
2019-04-17 10:49:11 +08:00
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
namespace OpenCL {
|
|
|
|
|
2024-04-19 11:58:21 +08:00
|
|
|
class InterpBufExecution : public CommonExecution {
|
2019-04-17 10:49:11 +08:00
|
|
|
public:
|
2021-03-12 18:41:50 +08:00
|
|
|
InterpBufExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend);
|
|
|
|
virtual ~InterpBufExecution() = default;
|
2019-04-17 10:49:11 +08:00
|
|
|
|
2024-04-19 11:58:21 +08:00
|
|
|
virtual ErrorCode onEncode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
2020-05-28 19:04:27 +08:00
|
|
|
|
2019-04-17 10:49:11 +08:00
|
|
|
|
|
|
|
private:
|
2020-05-28 19:04:27 +08:00
|
|
|
std::vector<uint32_t> mLWS{0, 0, 0, 0};
|
|
|
|
std::vector<uint32_t> mGWS{0, 0, 0, 0};
|
2019-04-17 10:49:11 +08:00
|
|
|
uint32_t mMaxWorkGroupSize;
|
2021-03-12 18:41:50 +08:00
|
|
|
std::string mKernelName;
|
2019-04-17 10:49:11 +08:00
|
|
|
OpenCLBackend *mOpenCLBackend;
|
2020-11-05 16:41:56 +08:00
|
|
|
float mCordTransform[4];
|
2019-04-17 10:49:11 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace OpenCL
|
|
|
|
} // namespace MNN
|
2021-03-12 18:41:50 +08:00
|
|
|
#endif /* InterpBufExecution_hpp */
|
|
|
|
#endif /* MNN_OPENCL_BUFFER_CLOSED */
|