// // GemmInt8Executor.hpp // MNNCPU // // Created by jbyang on 2023/3/16. // #ifndef GemmInt8Executor_hpp #define GemmInt8Executor_hpp #include "Int8FunctionsOpt.h" #include "backend/cpu/CPUConvolution.hpp" namespace MNN { class GemmInt8Executor : public CPUConvolution { public: GemmInt8Executor(Backend* bn, std::shared_ptr resource, const Op *op, decltype(CoreInt8Functions::Int8GemmKernel), std::vector bias); virtual ~GemmInt8Executor(); virtual ErrorCode onResize(const std::vector &inputs, const std::vector &outputs) override; virtual ErrorCode onExecute(const std::vector &inputs, const std::vector &outputs) override; protected: int mThreadNums; int mTileCnt; int mKernelX; int mKernelY; std::shared_ptr mInputCol; std::vector mScaleData; std::vector mKernelSum; std::vector mQuantBias; std::shared_ptr mResourceInt8; ConvolutionCommon::Im2ColParameter mIm2ColParamter; CPUConvolution::MutableResourceInt8 mMutableResource; decltype(CoreInt8Functions::Int8GemmKernel) mGemmKernel; MemChunk mBlitInfo; std::pair mBlitInfoStride; std::shared_ptr mResource; }; } // namespace MNN #endif /* DeconvInt8Executor_hpp */