ONE - On-device Neural Engine
Loading...
Searching...
No Matches
FullyConnectedLayer.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2025 Samsung Electronics Co., Ltd. All Rights Reserved
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef __ONERT_BACKEND_GGML_OPS_FULLYCONNECTEDLAYER_H__
18
#define __ONERT_BACKEND_GGML_OPS_FULLYCONNECTEDLAYER_H__
19
20
#include "../ExternalContext.h"
21
22
#include <
backend/IPortableTensor.h
>
23
#include <
exec/IFunction.h
>
24
#include <
ir/InternalType.h
>
25
26
namespace
onert::backend::ggml::ops
27
{
28
29
class
FullyConnectedLayer
:
public
::onert::exec::IFunction
30
{
31
public
:
32
FullyConnectedLayer
();
33
~FullyConnectedLayer
();
34
35
public
:
36
void
fullyConnectedGGMLWeight
();
37
38
void
configure
(
const
IPortableTensor
*input,
const
IPortableTensor
*weights,
39
const
IPortableTensor
*bias,
ir::Activation
activation,
IPortableTensor
*output,
40
const
std::shared_ptr<ExternalContext> &external_context);
41
42
void
run
()
override
;
43
44
void
prepare
()
override
;
45
46
protected
:
47
const
IPortableTensor
*
_input
;
48
const
IPortableTensor
*
_weights
;
49
const
IPortableTensor
*
_bias
;
50
IPortableTensor
*
_output
;
51
ir::Activation
_activation
;
52
53
std::shared_ptr<ExternalContext>
_external_context
;
54
};
55
56
}
// namespace onert::backend::ggml::ops
57
58
#endif
// __ONERT_BACKEND_GGML_OPS_FULLYCONNECTEDLAYER_H__
IFunction.h
IPortableTensor.h
InternalType.h
onert::backend::IPortableTensor
A tensor class that is portable for other backends.
Definition
IPortableTensor.h:37
onert::backend::ggml::ops::FullyConnectedLayer
Definition
FullyConnectedLayer.h:30
onert::backend::ggml::ops::FullyConnectedLayer::FullyConnectedLayer
FullyConnectedLayer()
Definition
FullyConnectedLayer.cc:76
onert::backend::ggml::ops::FullyConnectedLayer::_external_context
std::shared_ptr< ExternalContext > _external_context
Definition
FullyConnectedLayer.h:53
onert::backend::ggml::ops::FullyConnectedLayer::_weights
const IPortableTensor * _weights
Definition
FullyConnectedLayer.h:48
onert::backend::ggml::ops::FullyConnectedLayer::run
void run() override
Definition
FullyConnectedLayer.cc:131
onert::backend::ggml::ops::FullyConnectedLayer::_input
const IPortableTensor * _input
Definition
FullyConnectedLayer.h:47
onert::backend::ggml::ops::FullyConnectedLayer::prepare
void prepare() override
Definition
FullyConnectedLayer.cc:144
onert::backend::ggml::ops::FullyConnectedLayer::fullyConnectedGGMLWeight
void fullyConnectedGGMLWeight()
Definition
FullyConnectedLayer.cc:85
onert::backend::ggml::ops::FullyConnectedLayer::~FullyConnectedLayer
~FullyConnectedLayer()
onert::backend::ggml::ops::FullyConnectedLayer::configure
void configure(const IPortableTensor *input, const IPortableTensor *weights, const IPortableTensor *bias, ir::Activation activation, IPortableTensor *output, const std::shared_ptr< ExternalContext > &external_context)
Definition
FullyConnectedLayer.cc:118
onert::backend::ggml::ops::FullyConnectedLayer::_activation
ir::Activation _activation
Definition
FullyConnectedLayer.h:51
onert::backend::ggml::ops::FullyConnectedLayer::_output
IPortableTensor * _output
Definition
FullyConnectedLayer.h:50
onert::backend::ggml::ops::FullyConnectedLayer::_bias
const IPortableTensor * _bias
Definition
FullyConnectedLayer.h:49
onert::exec::IFunction
Definition
IFunction.h:24
onert::backend::ggml::ops
Definition
FullyConnectedLayer.cc:74
onert::ir::Activation
Activation
Definition
InternalType.h:26
runtime
onert
backend
ggml
ops
FullyConnectedLayer.h
Generated by
1.9.8