clDNN
|
Classes | |
struct | cldnn_tensor |
N-dimensional vector. Mostly used to represent memory size. More... | |
struct | cldnn_padding |
Padding information. More... | |
struct | cldnn_layout |
Memory layout description. More... | |
Typedefs | |
typedef struct cldnn_memory_impl * | cldnn_memory |
Memory object. | |
Enumerations | |
enum | cldnn_format_type { cldnn_format_yxfb, cldnn_format_byxf, cldnn_format_bfyx, cldnn_format_fyxb, cldnn_format_os_iyx_osv16, cldnn_format_bs_xs_xsv8_bsv8, cldnn_format_bs_xs_xsv8_bsv16, cldnn_format_bs_x_bsv16, cldnn_format_bf8_xy16, cldnn_format_image_2d_weights_c4_fyx_b, cldnn_format_image_2d_weights_c1_b_fyx, cldnn_format_format_num, cldnn_format_any = -1 } |
Represents memory formats (orders). In CNN most of data is describe as 4 dimensional blocks. In Intel(R) clDNN library we describe memory with 4 letters. More... | |
enum | cldnn_data_type { cldnn_i8 = sizeof(int8_t), cldnn_f16 = sizeof(int16_t) | CLDNN_FLOAT_TYPE_MASK, cldnn_f32 = sizeof(float) | CLDNN_FLOAT_TYPE_MASK, cldnn_u8 = sizeof(uint8_t) | CLDNN_UINT_TYPE_MASK } |
Data type stored in memory. | |
Functions | |
CLDNN_API cldnn_memory | cldnn_allocate_memory (cldnn_engine engine, cldnn_layout layout, cldnn_status *status) |
Allocate memory on engine using specified layout . | |
CLDNN_API cldnn_memory | cldnn_attach_memory (cldnn_layout layout, void *pointer, size_t size, cldnn_status *status) |
Create memory object attached to the buffer allocated by user. More... | |
CLDNN_API int32_t | cldnn_is_the_same_buffer (cldnn_memory mem1, cldnn_memory mem2, cldnn_status *status) |
Checks if two memory objects refer to the same underlaying buffer. | |
CLDNN_API void | cldnn_retain_memory (cldnn_memory memory, cldnn_status *status) |
Increment reference counter for the memory object. | |
CLDNN_API void | cldnn_release_memory (cldnn_memory memory, cldnn_status *status) |
Decrement reference counter for the memory object. Deletes object when counter becomes zero. | |
CLDNN_API void * | cldnn_lock_memory (cldnn_memory memory, cldnn_status *status) |
Locks memory buffer. Provides direct access to memory data. More... | |
CLDNN_API void | cldnn_unlock_memory (cldnn_memory memory, cldnn_status *status) |
Unlocks memory locked by cldnn_lock_memory(cldnn_memory memory, cldnn_status* status). | |
CLDNN_API cldnn_layout | cldnn_get_memory_layout (cldnn_memory memory, cldnn_status *status) |
Returns memory layout. More... | |
CLDNN_API cldnn_engine | cldnn_get_memory_engine (cldnn_memory memory, cldnn_status *status) |
Returns reference to the engine associated with memory object. More... | |
CLDNN_API uint16_t | cldnn_float_to_half (float, cldnn_status *) |
converts float(32 bit) to half_t(fp16 bit) More... | |
CLDNN_API float | cldnn_half_to_float (uint16_t, cldnn_status *) |
converts half_t(f16 bit) to float(32 bit) More... | |
struct cldnn_tensor |
struct cldnn_padding |
Class Members | ||
---|---|---|
float | filling_value |
Filling value for an element of padding. If data type of elements is different than float it is converted to it using round-towards-nearest-even (for floating-point data types) or round-towards-zero (for integral data types). |
cldnn_tensor | lower_size | Lower padding sizes. For spatials, it means size of left (X) and top (Y) padding. |
cldnn_tensor | upper_size | Upper padding sizes. For spatials, it means size of right (X) and bottom (Y) padding. |
struct cldnn_layout |
Class Members | ||
---|---|---|
size_t | data_type | data type (cldnn_data_type) stored in memory. |
int32_t | format | Memor format (cldnn_format_type) |
cldnn_padding | padding | Explicitly added padding to memory buffer. |
cldnn_tensor | size | N-dimensional vector describes size (in elements) of memory (excluding padding). |
enum cldnn_format_type |
Represents memory formats (orders).
In CNN most of data is describe as 4 dimensional blocks. In Intel(R) clDNN library we describe memory with 4 letters.
CLDNN_API cldnn_memory cldnn_attach_memory | ( | cldnn_layout | layout, |
void * | pointer, | ||
size_t | size, | ||
cldnn_status * | status | ||
) |
Create memory object attached to the buffer allocated by user.
CLDNN_API uint16_t cldnn_float_to_half | ( | float | , |
cldnn_status * | |||
) |
converts float(32 bit) to half_t(fp16 bit)
CLDNN_API cldnn_engine cldnn_get_memory_engine | ( | cldnn_memory | memory, |
cldnn_status * | status | ||
) |
Returns reference to the engine associated with memory object.
CLDNN_API cldnn_layout cldnn_get_memory_layout | ( | cldnn_memory | memory, |
cldnn_status * | status | ||
) |
Returns memory layout.
CLDNN_API float cldnn_half_to_float | ( | uint16_t | , |
cldnn_status * | |||
) |
converts half_t(f16 bit) to float(32 bit)
CLDNN_API void* cldnn_lock_memory | ( | cldnn_memory | memory, |
cldnn_status * | status | ||
) |
Locks memory buffer. Provides direct access to memory data.