Skip to content
Snippets Groups Projects

Draft: Add QAT

Open Olivier BICHLER requested to merge qat into dev
Compare and
64 files
+ 4819
19
Compare changes
  • Side-by-side
  • Inline
Files
64
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#ifndef AIDGE_CPU_OPERATOR_CGPACTIMPL_H_
#define AIDGE_CPU_OPERATOR_CGPACTIMPL_H_
#include <cstddef> // std::size_t
#include <memory>
#include <tuple> // std::tuple
#include <vector>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/CG-PACT.hpp"
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
namespace Aidge {
// compute kernel registry for forward and backward
class CGPACTImplForward_cpu
: public Registrable<CGPACTImplForward_cpu, std::tuple<DataType, DataType>, void(const std::size_t, size_t, const void*, const void*, void*)> {
};
class CGPACTImplBackward_cpu
: public Registrable<CGPACTImplBackward_cpu, std::tuple<DataType, DataType, DataType>, void(const std::size_t, size_t, const void*, const void*, const void*, void*, void*)> {
};
class CGPACTImpl_cpu : public OperatorImpl {
public:
CGPACTImpl_cpu(const CGPACT_Op& op) : OperatorImpl(op, "cpu") {}
static std::unique_ptr<CGPACTImpl_cpu> create(const CGPACT_Op& op) {
return std::make_unique<CGPACTImpl_cpu>(op);
}
void forward() override final;
void backward() override final;
};
namespace {
static Registrar<CGPACT_Op> registrarCGPACTImpl_cpu("cpu", Aidge::CGPACTImpl_cpu::create);
}
} // namespace Aidge
#endif /* AIDGE_CPU_OPERATOR_CGPACTIMPL_H_ */
Loading