oneAPI Deep Neural Network Library (oneDNN)
Performance library for Deep Learning
1.96.0
Primitive Cache

A set of functions that provide primitive cache control. More...

Functions

dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity (int *capacity)
 Returns the number of primitives that can be held in the primitive cache at the same time. More...
 
dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity (int capacity)
 Sets a number of primitives that can be held in the primitive cache at a time. More...
 
int dnnl::get_primitive_cache_capacity ()
 Returns the number of primitives that can be held in the primitive cache at the same time. More...
 
void dnnl::set_primitive_cache_capacity (int capacity)
 Sets a number of primitives that can be held in the primitive cache at a time. More...
 

Detailed Description

A set of functions that provide primitive cache control.

Function Documentation

◆ dnnl_get_primitive_cache_capacity()

dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity ( int *  capacity)

Returns the number of primitives that can be held in the primitive cache at the same time.

Parameters
capacityPrimitive cache capacity to query. Concurrently accessing capacity is safe.
Returns
dnnl_invalid_arguments/dnnl::status::invalid_arguments if the capacity value is invalid, and dnnl_success/dnnl::status::success on success.

◆ dnnl_set_primitive_cache_capacity()

dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity ( int  capacity)

Sets a number of primitives that can be held in the primitive cache at a time.

Parameters
capacityPrimitive cache capacity to set. If a new capacity is less than a number of primitives that the primitive cache already has then the excess entries will be evicted. Setting the capacity to 0 clears the primitive cache and disables it. Concurrently modifying capacity is safe.
Returns
dnnl_invalid_arguments/dnnl::status::invalid_arguments if the capacity value is invalid, and dnnl_success/dnnl::status::success on success.

◆ get_primitive_cache_capacity()

int dnnl::get_primitive_cache_capacity ( )
inline

Returns the number of primitives that can be held in the primitive cache at the same time.

◆ set_primitive_cache_capacity()

void dnnl::set_primitive_cache_capacity ( int  capacity)
inline

Sets a number of primitives that can be held in the primitive cache at a time.

Parameters
capacityPrimitive cache capacity to set. If a new capacity is less than a number of primitives that the primitive cache already has then the excess entries will be evicted. Setting the capacity to 0 clears the primitive cache and disables it. Concurrently modifying capacity is safe.
Returns
dnnl_invalid_arguments/dnnl::status::invalid_arguments if the capacity value is invalid, and dnnl_success/dnnl::status::success on success.