MNN/source/backend/opencl/execution/image/MatmulExecution.hpp

38 lines
867 B
C++
Raw Permalink Normal View History

2019-12-27 22:16:57 +08:00
//
// MatmulExecution.hpp
2019-12-27 22:16:57 +08:00
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef MatMulExecution_hpp
#define MatMulExecution_hpp
2024-04-19 11:58:21 +08:00
#include "CommonExecution.hpp"
2019-12-27 22:16:57 +08:00
namespace MNN {
namespace OpenCL {
2024-04-19 11:58:21 +08:00
class MatMulExecution : public CommonExecution {
2019-12-27 22:16:57 +08:00
public:
MatMulExecution(const std::vector<Tensor *> &inputs, const MNN::Op *op, Backend *backend, bool transposeA, bool transposeB);
2019-12-27 22:16:57 +08:00
virtual ~MatMulExecution() = default;
2024-04-19 11:58:21 +08:00
virtual ErrorCode onEncode(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
2019-12-27 22:16:57 +08:00
private:
bool mTransposeA;
bool mTransposeB;
2019-12-27 22:16:57 +08:00
uint32_t mMaxWorkGroupSize;
std::vector<int> mInput0Shape;
std::vector<int> mInput1Shape;
bool mAreadySetArg;
OpenCLBackend *mOpenCLBackend;
};
} // namespace OpenCL
} // namespace MNN
#endif