2 * Copyright (c) 2019 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 #ifndef __NNFW_EXPERIMENTAL_H__
18 #define __NNFW_EXPERIMENTAL_H__
22 // Used for custom kernel development
25 * operand type, used only for custom operations
34 * Used as input to custom operation eval function
42 nnfw_operand *outputs;
43 } nnfw_custom_kernel_params;
46 * Custom kernel evaluation function
48 * param[in] params custom operation parameters
49 * param[in] userdata pointer to user-specified buffer( kernel instance specific )
51 typedef void (*nnfw_custom_eval)(nnfw_custom_kernel_params *params, char *userdata,
52 size_t userdata_size);
55 * custom operation registration info
59 nnfw_custom_eval eval_function;
60 } custom_kernel_registration_info;
62 NNFW_STATUS nnfw_register_custom_op_info(nnfw_session *session, const char *id,
63 custom_kernel_registration_info *info);
65 #endif // __NNFW_EXPERIMENTAL_H__