clDNN
cldnn::custom_gpu_primitive Struct Reference

This primitive executes a custom kernel provided by the application. More...

#include <custom_gpu_primitive.hpp>

Inheritance diagram for cldnn::custom_gpu_primitive:
Collaboration diagram for cldnn::custom_gpu_primitive:

Public Types

typedef cldnn_custom_gpu_primitive_desc dto
 

Public Member Functions

 custom_gpu_primitive (const primitive_id &id, const std::vector< primitive_id > &input, const std::vector< std::string > &kernels_code, const std::string &kernel_entry_point, const std::vector< cldnn_arg > &kernel_arguments, const std::string &build_options, const layout &output_layout, const std::vector< size_t > &gws={}, const std::vector< size_t > &lws={})
 Constructs custom_gpu_primitive primitive. More...
 
 custom_gpu_primitive (const dto *dto)
 Constructs a copy from basic C API cldnn_custom_gpu_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive_base< custom_gpu_primitive, cldnn_custom_gpu_primitive_desc >
const cldnn_primitive_descget_dto () const override
 Returns pointer to a C API primitive descriptor casted to cldnn_primitive_desc.
 
- Public Member Functions inherited from cldnn::primitive
 primitive (const primitive_type_id &type, const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive (const cldnn_primitive_desc *dto)
 Constructs a copy from basic C API cldnn_primitive_desc.
 
std::vector< std::reference_wrapper< primitive_id > > dependecies ()
 Returns references to all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
std::vector< primitive_iddependecies () const
 Returns copy of all primitive ids on which this primitive depends - inputs, weights, biases, etc.
 
 operator primitive_id () const
 Implicit conversion to primiitive id.
 

Static Public Member Functions

static primitive_type_id type_id ()
 

Public Attributes

fixed_size_vector_ref kernels_code
 Source code for the kernel.
 
const std::string kernel_entry_point
 The name of the entry point function in the kernel.
 
const std::vector< cldnn_argkernel_arguments
 Argument bindings for the entry point function.
 
const std::string build_options
 The kernel's build options.
 
const layout output_layout
 The output layout declared by the primitive.
 
const std::vector< size_t > gws
 The global working sizes.
 
const std::vector< size_t > lws
 The local working sizes.
 
- Public Attributes inherited from cldnn::primitive
const primitive_type_id type
 Primitive's type id.
 
const primitive_id id
 Primitive's id.
 
fixed_size_vector_ref input
 List of ids of input primitives.
 
padding output_padding
 Requested output padding.
 

Protected Member Functions

void update_dto (dto &dto) const override
 
- Protected Member Functions inherited from cldnn::primitive_base< custom_gpu_primitive, cldnn_custom_gpu_primitive_desc >
 primitive_base (const primitive_id &id, const std::vector< primitive_id > &input, const padding &output_padding=padding())
 
 primitive_base (const cldnn_custom_gpu_primitive_desc *dto)
 
- Protected Member Functions inherited from cldnn::primitive
virtual std::vector< std::reference_wrapper< const primitive_id > > get_dependencies () const
 

Protected Attributes

primitive_id_arr _kernels_code
 
- Protected Attributes inherited from cldnn::primitive
primitive_id_arr _input
 

Detailed Description

This primitive executes a custom kernel provided by the application.

The application is required to provide all relevant details for executing the custom kernel such as: sources, entry point, work sizes and parameter bindings.

Definition at line 35 of file custom_gpu_primitive.hpp.

Constructor & Destructor Documentation

◆ custom_gpu_primitive()

cldnn::custom_gpu_primitive::custom_gpu_primitive ( const primitive_id id,
const std::vector< primitive_id > &  input,
const std::vector< std::string > &  kernels_code,
const std::string &  kernel_entry_point,
const std::vector< cldnn_arg > &  kernel_arguments,
const std::string &  build_options,
const layout output_layout,
const std::vector< size_t > &  gws = {},
const std::vector< size_t > &  lws = {} 
)
inline

Constructs custom_gpu_primitive primitive.

Parameters
idThis primitive id.
inputInput primitive ids.
kernels_codeSource code for the kernel
kernel_entry_pointThe name of the entry point function in the kernel
kernel_argumentsArgument bindings for the entry point function
build_optionsBuild options/flags used during the compilation of the custom kernel
output_layoutOutput layout declared by the primitive
gwsGlobal work sizes
lwsLocal work sizes

Definition at line 49 of file custom_gpu_primitive.hpp.


The documentation for this struct was generated from the following file: