2 // Copyright (c) 2016 Intel Corporation
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 ///////////////////////////////////////////////////////////////////////////////////////////////////
18 #ifndef CUSTOM_GPU_PRIMITIVE_H
19 #define CUSTOM_GPU_PRIMITIVE_H
22 /// @addtogroup c_api C API
24 /// @addtogroup c_topology Network Topology
26 /// @addtogroup c_primitives Primitives
33 /// @brief This primitive executes a custom kernel provided by the application
34 /// @details The application is required to provide all relevant details for executing the custom kernel
35 /// such as: sources, entry point, work sizes and parameter bindings.
36 CLDNN_BEGIN_PRIMITIVE_DESC(custom_gpu_primitive)
37 /// @brief Source code for the kernel
38 cldnn_primitive_id_arr kernels_code;
39 /// @brief The name of the entry point function in the kernel
40 cldnn_kernel_entry_point kernel_entry_point;
41 /// @brief Argument bindings for the entry point function
42 cldnn_kernel_arguments kernel_arguments;
43 /// @brief The number of arguments used by the kernel
44 int kernel_arguments_num;
45 /// @brief The kernel's build options
46 cldnn_kernel_build_options build_options;
47 /// @brief The output layout declared by the primitive
48 cldnn_layout output_layout;
49 /// @brief The global working sizes
50 cldnn_work_group_sizes gws;
51 /// @brief The number of global work sizes
53 /// @brief The local working sizes
54 cldnn_work_group_sizes lws;
55 /// @brief The number of local work sizes
58 CLDNN_END_PRIMITIVE_DESC(custom_gpu_primitive)
60 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(custom_gpu_primitive);
69 #endif /* CUSTOM_GPU_PRIMITIVE_H */