Skip to content
Snippets Groups Projects

Thales contribution

Merged Lucas RAKOTOARIVONY requested to merge (removed):main into dev
Files
12
/********************************************************************************
* Copyright (c) 2024 Thales
*
* 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
* Author: Lucas RAKOTOARIVONY, Thales Research & Technology France
* Date: 25.06.2024
*
********************************************************************************/
#ifndef AIDGE_BACKEND_CUDA_OPERATOR_SHIFTGELUIMPL_H_
#define AIDGE_BACKEND_CUDA_OPERATOR_SHIFTGELUIMPL_H_
#include <array>
#include <memory>
#include <tuple>
#include <vector>
#include <cudnn.h>
#include "aidge/backend/OperatorImpl.hpp"
#include "aidge/operator/ShiftGELU.hpp"
#include "aidge/utils/Registrar.hpp"
#include "aidge/utils/Types.h"
#include "aidge/backend/cuda/utils/CudaUtils.hpp"
namespace Aidge {
class ShiftGELUImpl_cuda : public OperatorImpl {
private:
std::shared_ptr<Tensor> mInputFallback;
public:
ShiftGELUImpl_cuda(const ShiftGELU_Op &op) : OperatorImpl(op, "cuda") {}
static std::unique_ptr<ShiftGELUImpl_cuda> create(const ShiftGELU_Op &op) {
return std::make_unique<ShiftGELUImpl_cuda>(op);
}
public:
void forward();
//~ShiftGELUImpl_cuda();
private:
template <class T> void forward_(const Tensor& input);
};
namespace {
// add cuda backend to ShiftGELU_Op implementation registry
static Registrar<ShiftGELU_Op> registrarShiftGELUImpl_cuda("cuda", Aidge::ShiftGELUImpl_cuda::create);
} // namespace
} // namespace Aidge
#endif /* AIDGE_BACKEND_CUDA_OPERATOR_SHIFTGELUIMPL_H_ */
\ No newline at end of file
Loading