2 * Copyright (c) 2023 Samsung Electronics Co., Ltd. All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #include "KernelBuilder.h"
19 namespace luci_interpreter
22 void KernelConfigureRegistry::configure_kernel(const circle::Operator *cur_op,
23 circle::BuiltinOperator opcode,
24 BaseRuntimeGraph *runtime_graph) const
26 auto specific_configure_func = get_kernel_configure_func(opcode);
27 if (specific_configure_func == nullptr)
28 assert(false && "Unsupported operator");
30 specific_configure_func(cur_op, runtime_graph);
33 void KernelExecuteRegistry::execute_kernel(const circle::Operator *cur_op,
34 circle::BuiltinOperator opcode,
35 BaseRuntimeGraph *runtime_graph) const
37 auto specific_execute_func = get_kernel_execute_func(opcode);
38 if (specific_execute_func == nullptr)
39 assert(false && "Unsupported operator");
41 specific_execute_func(cur_op, runtime_graph);
44 } // namespace luci_interpreter