2020-11-05 16:41:56 +08:00
|
|
|
//
|
|
|
|
// BinaryExecution.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2020/07/29.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef BinaryExecution_hpp
|
|
|
|
#define BinaryExecution_hpp
|
|
|
|
#include <vector>
|
|
|
|
#include "backend/cuda/core/CUDABackend.hpp"
|
|
|
|
#include "core/Execution.hpp"
|
2023-06-16 09:42:45 +08:00
|
|
|
#ifdef ENABLE_CUDA_QUANT
|
|
|
|
#include "int8/BinaryInt8Execution.hpp"
|
|
|
|
#endif
|
|
|
|
|
2020-11-05 16:41:56 +08:00
|
|
|
namespace MNN {
|
|
|
|
namespace CUDA {
|
|
|
|
class BinaryExecution : public Execution {
|
|
|
|
public:
|
2022-09-30 10:02:52 +08:00
|
|
|
BinaryExecution(int opType, Backend *backend, int activationType = 0);
|
2020-11-05 16:41:56 +08:00
|
|
|
virtual ~BinaryExecution();
|
|
|
|
virtual ErrorCode onExecute(const std::vector<Tensor *> &inputs, const std::vector<Tensor *> &outputs) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int mType;
|
2022-09-30 10:02:52 +08:00
|
|
|
int mActivationType;
|
2020-11-05 16:41:56 +08:00
|
|
|
};
|
|
|
|
} // namespace CUDA
|
|
|
|
} // namespace MNN
|
|
|
|
|
|
|
|
#endif
|