blob: 186d2c1859e6a267125ceef7fe94fce4e16ed1d6 [file] [log] [blame]
Eric Kunzee5e26762020-10-13 16:11:07 -07001
Jerry Ge5637a862023-10-30 10:18:45 -07002// Copyright (c) 2020, 2023 ARM Limited.
Eric Kunzee5e26762020-10-13 16:11:07 -07003//
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#ifndef OPS_CUSTOM_H
17#define OPS_CUSTOM_H
18
Jerry Ge5637a862023-10-30 10:18:45 -070019#include "attribute.h"
20#include "custom_registry.h"
Eric Kunzee5e26762020-10-13 16:11:07 -070021#include "graph_node.h"
22
23using namespace tosa;
24
25namespace TosaReference
26{
Eric Kunzee5e26762020-10-13 16:11:07 -070027class OpCustom : public GraphNode
28{
29public:
Jerry Ge5637a862023-10-30 10:18:45 -070030 OpCustom(SubgraphTraverser* sgt_, TosaAttributeBase* attribute_, uint64_t id_);
31 ~OpCustom();
Eric Kunzee5e26762020-10-13 16:11:07 -070032
Jerry Ge5637a862023-10-30 10:18:45 -070033 int checkTensorAttributes();
34 int eval();
35
36protected:
37 TosaCustomAttribute* attribute;
38
39private:
40 CustomOpInterface* custom_op_ptr;
Eric Kunzee5e26762020-10-13 16:11:07 -070041};
Eric Kunzee5e26762020-10-13 16:11:07 -070042}; // namespace TosaReference
43
44#endif